From: fatbob313 Date: Sun, 23 Jan 2011 12:05:52 +0000 (+0000) Subject: Issue 17 - patch by tilman2: Always pass a format string to syslog() X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;h=a8ca900b2e60cc837c5e9529d7a9c778ff30c955;p=umurmur.git Issue 17 - patch by tilman2: Always pass a format string to syslog() --- diff --git a/src/log.c b/src/log.c index 9392884..5d2af2b 100644 --- a/src/log.c +++ b/src/log.c @@ -66,7 +66,7 @@ void logthis(const char *logstring, ...) if (termprint) fprintf(stderr, "%s\n", buf); else - syslog(LOG_INFO, buf); + syslog(LOG_INFO, "%s", buf); } void Log_warn(const char *logstring, ...) @@ -82,7 +82,7 @@ void Log_warn(const char *logstring, ...) if (termprint) fprintf(stderr, "%s\n", buf); else - syslog(LOG_WARNING, buf); + syslog(LOG_WARNING, "%s", buf); } void Log_info(const char *logstring, ...) @@ -98,7 +98,7 @@ void Log_info(const char *logstring, ...) if (termprint) fprintf(stderr, "%s\n", buf); else - syslog(LOG_INFO, buf); + syslog(LOG_INFO, "%s", buf); } void Log_info_client(client_t *client, const char *logstring, ...) { @@ -118,7 +118,7 @@ void Log_info_client(client_t *client, const char *logstring, ...) if (termprint) fprintf(stderr, "%s\n", buf); else - syslog(LOG_INFO, buf); + syslog(LOG_INFO, "%s", buf); } @@ -136,7 +136,7 @@ void Log_debug(const char *logstring, ...) if (termprint) fprintf(stderr, "%s\n", buf); else - syslog(LOG_DEBUG, buf); + syslog(LOG_DEBUG, "%s", buf); } #endif @@ -152,6 +152,6 @@ void Log_fatal(const char *logstring, ...) if (termprint) fprintf(stderr, "%s\n", buf); else - syslog(LOG_CRIT, buf); + syslog(LOG_CRIT, "%s", buf); exit(1); }