diff options
author | Doug Barton <dougb@FreeBSD.org> | 2008-12-23 18:35:21 +0000 |
---|---|---|
committer | Doug Barton <dougb@FreeBSD.org> | 2008-12-23 18:35:21 +0000 |
commit | 2fabdf5789e562f51310270bef3cb863c0dc920b (patch) | |
tree | d25d756be8550df073eb3ed4e5b39831380291b5 /lib/bind/isc/logging.c | |
parent | e086bf114fd88cb7f882d66afe4492fe5659bcf2 (diff) |
Notes
Diffstat (limited to 'lib/bind/isc/logging.c')
-rw-r--r-- | lib/bind/isc/logging.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/bind/isc/logging.c b/lib/bind/isc/logging.c index ca7049c74eb6..0cabc4d27220 100644 --- a/lib/bind/isc/logging.c +++ b/lib/bind/isc/logging.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: logging.c,v 1.6.18.1 2005/04/27 05:01:07 sra Exp $"; +static const char rcsid[] = "$Id: logging.c,v 1.6.18.2 2008/02/28 05:49:37 marka Exp $"; #endif /* not lint */ #include "port_before.h" @@ -43,12 +43,6 @@ static const char rcsid[] = "$Id: logging.c,v 1.6.18.1 2005/04/27 05:01:07 sra E #include "port_after.h" -#ifdef VSPRINTF_CHAR -# define VSPRINTF(x) strlen(vsprintf/**/x) -#else -# define VSPRINTF(x) ((size_t)vsprintf x) -#endif - #include "logging_p.h" static const int syslog_priority[] = { LOG_DEBUG, LOG_INFO, LOG_NOTICE, @@ -363,8 +357,8 @@ log_vwrite(log_context lc, int category, int level, const char *format, continue; if (!did_vsprintf) { - if (VSPRINTF((lc->buffer, format, args)) > - (size_t)LOG_BUFFER_SIZE) { + (void)vsprintf(lc->buffer, format, args); + if (strlen(lc->buffer) > (size_t)LOG_BUFFER_SIZE) { syslog(LOG_CRIT, "memory overrun in log_vwrite()"); exit(1); |