summaryrefslogtreecommitdiff
path: root/lib/log.c
diff options
context:
space:
mode:
authorhasso <hasso>2004-10-04 19:10:31 +0000
committerhasso <hasso>2004-10-04 19:10:31 +0000
commitb04c699ecfb4704a67f4583e4ea929a6a3e49856 (patch)
tree9149adb41b7bc1acca6c882ab413f68b19b2a64d /lib/log.c
parent97c52f4e397848fb18c689dfe161d0b8f7803722 (diff)
First small part of lib cleanup. Mainly "constification" of arguments and
adding FIXME's.
Diffstat (limited to 'lib/log.c')
-rw-r--r--lib/log.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/log.c b/lib/log.c
index 5f6b32f5..2090b91e 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -113,7 +113,8 @@ vzlog (struct zlog *zl, int priority, const char *format, va_list *args)
if (zl->flags & ZLOG_FILE)
{
time_print (zl->fp);
- if (zl->record_priority) fprintf (zl->fp, "%s: ", zlog_priority[priority]);
+ if (zl->record_priority)
+ fprintf (zl->fp, "%s: ", zlog_priority[priority]);
fprintf (zl->fp, "%s: ", zlog_proto_names[zl->protocol]);
vfprintf (zl->fp, format, args[ZLOG_FILE_INDEX]);
fprintf (zl->fp, "\n");
@@ -124,7 +125,8 @@ vzlog (struct zlog *zl, int priority, const char *format, va_list *args)
if (zl->flags & ZLOG_STDOUT)
{
time_print (stdout);
- if (zl->record_priority) fprintf (stdout, "%s: ", zlog_priority[priority]);
+ if (zl->record_priority)
+ fprintf (stdout, "%s: ", zlog_priority[priority]);
fprintf (stdout, "%s: ", zlog_proto_names[zl->protocol]);
vfprintf (stdout, format, args[ZLOG_STDOUT_INDEX]);
fprintf (stdout, "\n");
@@ -135,7 +137,8 @@ vzlog (struct zlog *zl, int priority, const char *format, va_list *args)
if (zl->flags & ZLOG_STDERR)
{
time_print (stderr);
- if (zl->record_priority) fprintf (stderr, "%s: ", zlog_priority[priority]);
+ if (zl->record_priority)
+ fprintf (stderr, "%s: ", zlog_priority[priority]);
fprintf (stderr, "%s: ", zlog_proto_names[zl->protocol]);
vfprintf (stderr, format, args[ZLOG_STDERR_INDEX]);
fprintf (stderr, "\n");
@@ -484,7 +487,7 @@ lookup (struct message *mes, int key)
}
/* Very old hacky version of message lookup function. Still partly
- used in bgpd and ospfd. */
+ used in bgpd and ospfd. FIXME Seems that it's not used any more. */
char *
mes_lookup (struct message *meslist, int max, int index)
{