From b6618b6b7402e4c75b8ab7c2eb809b6454d56707 Mon Sep 17 00:00:00 2001 From: Wilco Baan Hofman Date: Mon, 28 Nov 2016 10:21:45 +0100 Subject: [PATCH] Fix warnings about using variables (though const) as formatting strings. Fix whitespace. --- status.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/status.c b/status.c index e1c693e..0ef9d74 100644 --- a/status.c +++ b/status.c @@ -47,16 +47,16 @@ STATUS debug(int loglevel, const char *location, const char *function, ...) if (s == 0) { const char *text = "Failed to get proper strftime formatted date\n"; if (conf->foreground) { - fprintf(stderr, text); + fprintf(stderr, "%s", text); } - fprintf(logfile, text); + fprintf(logfile, "%s", text); return ST_GENERAL_FAILURE; } - fprintf(logfile, "%s: %s(%d): Log level %d, at %s in function %s():\n", + fprintf(logfile, "%s: %s(%d): Log level %d, at %s in function %s():\n", timebuf, get_process_name(), getpid(), loglevel, location, function); if (conf->foreground) - fprintf(stderr, "%s: %s(%d): Log level %d, at %s in function %s():\n", + fprintf(stderr, "%s: %s(%d): Log level %d, at %s in function %s():\n", timebuf, get_process_name(), getpid(), loglevel, location, function); va_start(ap, function);