All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/cmirror/src cluster.c logging.h
@ 2007-11-03 18:53 jbrassow
  0 siblings, 0 replies; only message in thread
From: jbrassow @ 2007-11-03 18:53 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	jbrassow at sourceware.org	2007-11-03 18:53:03

Modified files:
	cmirror/src    : cluster.c logging.h 

Log message:
	- Found the problem with my logging macros.  Locally defined variables
	were overriding similarly named variables at the larger scope.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/cluster.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.2&r2=1.1.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/logging.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2

--- cluster/cmirror/src/Attic/cluster.c	2007/11/03 18:37:48	1.1.2.2
+++ cluster/cmirror/src/Attic/cluster.c	2007/11/03 18:53:03	1.1.2.3
@@ -712,12 +712,8 @@
 
 	LOG_PRINT("* MEMBERS (%d):", member_list_entries);
 	for (i = 0; i < member_list_entries; i++)
-		/*
 		LOG_PRINT("*   [%d] nodeid: %d, pid: %d",
 			  i, member_list[i].nodeid, member_list[i].pid);
-		*/
-		syslog(LOG_NOTICE, "*   [%d] nodeid: %d, pid: %d",
-		       i, member_list[i].nodeid, member_list[i].pid);
 
 	LOG_PRINT("* LEAVING (%d):", left_list_entries);
 	for (i = 0; i < left_list_entries; i++)
--- cluster/cmirror/src/Attic/logging.h	2007/08/23 19:57:31	1.1.2.1
+++ cluster/cmirror/src/Attic/logging.h	2007/11/03 18:53:03	1.1.2.2
@@ -17,17 +17,17 @@
 		closelog();	 \
 	} while (0)
 
-#define LOG_OUTPUT(level, f, arg...) do {	\
-		int i;							\
-		char buffer[16];					\
+#define LOG_OUTPUT(level, f, arg...) do {				\
+		int __i;						\
+		char __buffer[16];					\
 		FILE *fp = (level > LOG_NOTICE) ? stderr : stdout;	\
 		if (log_is_open) {					\
-			for (i = 0; (i < log_tabbing) && (i < 15); i++)	\
-				buffer[i] = '\t';			\
-			buffer[i] = '\0';				\
-			syslog(level, "%s" f "\n", buffer, ## arg);	\
+			for (__i = 0; (__i < log_tabbing) && (__i < 15); __i++) \
+				__buffer[__i] = '\t';			\
+			__buffer[__i] = '\0';				\
+			syslog(level, "%s" f "\n", __buffer, ## arg);	\
 		} else {						\
-			for (i = 0; i < log_tabbing; i++)		\
+			for (__i = 0; __i < log_tabbing; __i++)		\
 				fprintf(fp, "\t");			\
 			fprintf(fp, f "\n", ## arg);			\
 		}							\



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-03 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-03 18:53 [Cluster-devel] cluster/cmirror/src cluster.c logging.h jbrassow

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.