Skip to contentSkip to conversation

device-mapper ./WHATS_NEW dmeventd/old/dmevent ...

PATCH [email protected] 1 participant 1 message Feb 15, 2008 Device mapper

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/dm
Module name: device-mapper
Changes by: [email protected] 2008-02-15 14:14:58

Modified files:
. : WHATS_NEW
dmeventd/old : dmevent.c
multilog/pthread_lock: pthread_lock.c

Log message:
Remove redundant if-before-free tests.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/WHATS_NEW.diff?cvsroot=dm&r1=1.224&r2=1.225
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/dmeventd/old/dmevent.c.diff?cvsroot=dm&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/multilog/pthread_lock/pthread_lock.c.diff?cvsroot=dm&r1=1.3&r2=1.4

WHATS_NEW +2 -2
@@ -1,5 +1,6 @@
 Version 1.02.25 - 
 ====================================
+  Remove redundant if-before-free tests.
   Use log_warn for reporting field help text instead of log_print.
   Change cluster mirror log type name (s/clustered_/clustered-/)
 
@@ -35,7 +36,7 @@
 Version 1.02.21 - 13th July 2007
 ================================
   Introduce _LOG_STDERR to send log_warn() messages to stderr not stdout.
-  Fix dmsetup -o devno string termination. (1.02.20) 
+  Fix dmsetup -o devno string termination. (1.02.20)
 
 Version 1.02.20 - 15th June 2007
 ================================
@@ -323,4 +324,3 @@
   Fixed DESTDIR for make install/install_static_lib.
   Updated README/INSTALL to reflect move to sources.redhat.com.
   Updated autoconf files to 2003-06-17.
-
dmeventd/old/dmevent.c +2 -4
@@ -220,10 +220,8 @@
    out:
 	multilog_del_type(standard);
 
-	if (device)
-		free(device);
-	if (dso_name)
-		free(dso_name);
+	free(device);
+	free(dso_name);
 
 	exit(ret);
 }
multilog/pthread_lock/pthread_lock.c +1 -2
@@ -62,7 +62,6 @@
 void destroy_locking(void *handle)
 {
         pthread_mutex_t *mutex = (pthread_mutex_t *)handle;
-	if(mutex)
-		free(mutex);
+	free(mutex);
 }