[PATCH] quick fixes for last log.c changes
"Angel Fradejas" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Attached a patch to fix some minor problems with last log.c patch 1) fixes wrong use of & in a info() call (spotted by "gwlib/log.c:105: warning: char format, different type arg (arg 3)") 2) more consistent and safe check for stderr Cheers. Angel Fradejas Mediafusión España, S.A. [email protected] www.mediafusion.es Tel. +34 91 252 32 00 Fax +34 91 572 27 08
patch_logc.diff
(application/octet-stream, 887 B)
Index: gwlib/log.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/log.c,v
retrieving revision 1.29
diff -u -r1.29 log.c
--- gwlib/log.c 27 Feb 2003 20:36:23 -0000 1.29
+++ gwlib/log.c 28 Feb 2003 11:19:52 -0000
@@ -96,13 +96,12 @@
{
int i;
- /*
- * start with index 1, because 0 is stderr and
- * we want to keep that untouched.
- */
- for (i = 1; i < num_logfiles; ++i) {
- logfiles[i].minimum_output_level = level;
- info(0, "Changed logfile `%s' to level `%d'.", &logfiles[i].filename, level);
+ /* change everything but stderr */
+ for (i = 0; i < num_logfiles; ++i) {
+ if (logfiles[i].file != stderr) {
+ logfiles[i].minimum_output_level = level;
+ info(0, "Changed logfile `%s' to level `%d'.", logfiles[i].filename, level);
+ }
}
}