diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-06 01:00:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-06 01:00:50 +0000 |
commit | 8847bc5ed153535f3b1ab85f4ed40bf9c426891e (patch) | |
tree | fcfd215c49b264c321640f9db7ca77c733175f55 | |
parent | 84f0420e672cc5b2cdfee933c42ffce105bed7c2 (diff) |
KNF
-rw-r--r-- | usr.bin/ssh/log.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/ssh/log.c b/usr.bin/ssh/log.c index 887045f2187..8dfc6882a26 100644 --- a/usr.bin/ssh/log.c +++ b/usr.bin/ssh/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" @@ -89,6 +89,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) @@ -100,6 +101,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) @@ -113,6 +115,7 @@ void error(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_ERROR, fmt, args); va_end(args); @@ -124,6 +127,7 @@ void log(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_INFO, fmt, args); va_end(args); @@ -135,6 +139,7 @@ void verbose(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_VERBOSE, fmt, args); va_end(args); @@ -146,6 +151,7 @@ void debug(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG1, fmt, args); va_end(args); @@ -155,6 +161,7 @@ void debug2(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG2, fmt, args); va_end(args); @@ -164,6 +171,7 @@ void debug3(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG3, fmt, args); va_end(args); |