From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cmirror/src cluster.c logging.h
Date: 3 Nov 2007 18:53:04 -0000 [thread overview]
Message-ID: <20071103185304.15309.qmail@sourceware.org> (raw)
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); \
} \
reply other threads:[~2007-11-03 18:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071103185304.15309.qmail@sourceware.org \
--to=jbrassow@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).