Skip to contentSkip to conversation

cluster/group/gfs_controld lock_dlm.h

Cluster-devel [email protected] 1 participant 1 message Nov 21, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2007-11-21 17:49:16

Modified files:
group/gfs_controld: lock_dlm.h

Log message:
ASSERT was doing fprintf(stderr) which goes somewhere we don't want when running as a daemon.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/lock_dlm.h.diff?cvsroot=cluster&r1=1.29&r2=1.30

group/gfs_controld/lock_dlm.h +5 -6
@@ -105,13 +105,12 @@
 } while (0)
 
 #define ASSERT(x) \
-{ \
+do { \
 	if (!(x)) { \
-		fprintf(stderr, "\nAssertion failed on line %d of file %s\n\n" \
-			"Assertion:  \"%s\"\n", \
-			__LINE__, __FILE__, #x); \
-        } \
-}
+		log_error("Assertion failed on line %d of file %s\n" \
+			  "Assertion:  \"%s\"\n", __LINE__, __FILE__, #x); \
+	} \
+} while (0)
 
 struct mountpoint {
 	struct list_head	list;