From 8e8ef2a3ffb03d48bb9d6b894152497810f19044 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Sun, 7 Jul 2002 22:14:55 +0000 Subject: - deraadt@cvs.openbsd.org 2002/07/06 01:00:49 [log.c] KNF --- ChangeLog | 5 ++++- log.c | 10 +++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0073f52c0..923f44463 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,9 @@ [key.c monitor_wrap.c ssh-dss.c ssh-rsa.c] don't allocate, copy, and discard if there is not interested in the data; ok deraadt@ + - deraadt@cvs.openbsd.org 2002/07/06 01:00:49 + [log.c] + KNF 20020705 - (tim) [configure.ac] AIX 4.2.1 has authenticate() in libs. @@ -1299,4 +1302,4 @@ - (stevesk) entropy.c: typo in debug message - (djm) ssh-keygen -i needs seeded RNG; report from markus@ -$Id: ChangeLog,v 1.2344 2002/07/07 22:13:31 mouring Exp $ +$Id: ChangeLog,v 1.2345 2002/07/07 22:14:55 mouring Exp $ diff --git a/log.c b/log.c index c88f632c9..8c09ec1b2 100644 --- a/log.c +++ b/log.c @@ -34,7 +34,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: log.c,v 1.22 2002/02/22 12:20:34 markus Exp $"); +RCSID("$OpenBSD: log.c,v 1.23 2002/07/06 01:00:49 deraadt Exp $"); #include "log.h" #include "xmalloc.h" @@ -92,6 +92,7 @@ SyslogFacility log_facility_number(char *name) { int i; + if (name != NULL) for (i = 0; log_facilities[i].name; i++) if (strcasecmp(log_facilities[i].name, name) == 0) @@ -103,6 +104,7 @@ LogLevel log_level_number(char *name) { int i; + if (name != NULL) for (i = 0; log_levels[i].name; i++) if (strcasecmp(log_levels[i].name, name) == 0) @@ -116,6 +118,7 @@ void error(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_ERROR, fmt, args); va_end(args); @@ -127,6 +130,7 @@ void log(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_INFO, fmt, args); va_end(args); @@ -138,6 +142,7 @@ void verbose(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_VERBOSE, fmt, args); va_end(args); @@ -149,6 +154,7 @@ void debug(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG1, fmt, args); va_end(args); @@ -158,6 +164,7 @@ void debug2(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG2, fmt, args); va_end(args); @@ -167,6 +174,7 @@ void debug3(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG3, fmt, args); va_end(args); -- cgit v1.2.3