diff options
-rw-r--r-- | sbin/isakmpd/log.c | 4 | ||||
-rw-r--r-- | sbin/photurisd/log.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sbin/isakmpd/log.c b/sbin/isakmpd/log.c index 05d2950191a..5697e04545e 100644 --- a/sbin/isakmpd/log.c +++ b/sbin/isakmpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.21 2001/07/10 10:47:37 ho Exp $ */ +/* $OpenBSD: log.c,v 1.22 2001/08/18 20:50:02 deraadt Exp $ */ /* $EOM: log.c,v 1.30 2000/09/29 08:19:23 niklas Exp $ */ /* @@ -154,7 +154,7 @@ _log_print (int error, int syslog_level, const char *fmt, va_list ap, time_t t; len = vsnprintf (buffer, LOG_SIZE, fmt, ap); - if (len < LOG_SIZE - 1 && error) + if (len > 0 && len < LOG_SIZE - 1 && error) snprintf (buffer + len, LOG_SIZE - len, ": %s", strerror (errno)); if (log_output) { diff --git a/sbin/photurisd/log.c b/sbin/photurisd/log.c index e470a62bba2..964bbbda4f2 100644 --- a/sbin/photurisd/log.c +++ b/sbin/photurisd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.1 2000/12/11 21:21:18 provos Exp $ */ +/* $OpenBSD: log.c,v 1.2 2001/08/18 20:50:02 deraadt Exp $ */ /* $EOM: log.c,v 1.30 2000/09/29 08:19:23 niklas Exp $ */ /* @@ -104,7 +104,7 @@ _log_print (int error, int syslog_level, const char *fmt, va_list ap, time_t t; len = vsnprintf (buffer, LOG_SIZE, fmt, ap); - if (len < LOG_SIZE - 1 && error) + if (len > 0 && len < LOG_SIZE - 1 && error) snprintf (buffer + len, LOG_SIZE - len, ": %s", strerror (errno)); if (log_output) { |