From f7c616d2b95b807b0a4d1e1cb4b10421e135c785 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Mon, 19 Oct 2020 20:07:46 +0100 Subject: [PATCH] log.c: fix format string args --- src/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/log.c b/src/log.c index 873abb2..516fcd8 100644 --- a/src/log.c +++ b/src/log.c @@ -179,9 +179,9 @@ void log_message (int level, const char *fmt, ...) strftime (time_string, TIME_LENGTH, "%b %d %H:%M:%S", localtime (&nowtime.tv_sec)); - snprintf (str, STRING_LENGTH, "%-9s %s.%03u [%ld]: ", + snprintf (str, STRING_LENGTH, "%-9s %s.%03lu [%ld]: ", syslog_level[level], time_string, - nowtime.tv_nsec/1000000u, + (unsigned long) nowtime.tv_nsec/1000000ul, (long int) getpid ()); /*