diff options
-rw-r--r-- | lib/log.cc | 2 | ||||
-rw-r--r-- | plpprint/plpprintd.cc | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -37,7 +37,7 @@ int logbuf::overflow(int c) { *ptr++ = '\n'; *ptr = '\0'; if (_on) - syslog(_level, buf); + syslog(_level, "%s", buf); else if (_fd != -1) write(_fd, buf, len + 1); ptr = buf; diff --git a/plpprint/plpprintd.cc b/plpprint/plpprintd.cc index e68525a..5898d64 100644 --- a/plpprint/plpprintd.cc +++ b/plpprint/plpprintd.cc @@ -91,7 +91,7 @@ debuglog(char *fmt, ...) if (debug) cout << buf << endl; else - syslog(LOG_DEBUG, buf); + syslog(LOG_DEBUG, "%s", buf); free(buf); return 0; } @@ -104,7 +104,7 @@ errorlog(char *fmt, ...) if (debug) cerr << buf << endl; else - syslog(LOG_ERR, buf); + syslog(LOG_ERR, "%s", buf); free(buf); return 0; } @@ -117,7 +117,7 @@ infolog(char *fmt, ...) if (debug) cout << buf << endl; else - syslog(LOG_INFO, buf); + syslog(LOG_INFO, "%s", buf); free(buf); return 0; } |