Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7c616d

Browse files
committed
log.c: fix format string args
1 parent cc0a7eb commit f7c616d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/log.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ void log_message (int level, const char *fmt, ...)
179179
strftime (time_string, TIME_LENGTH, "%b %d %H:%M:%S",
180180
localtime (&nowtime.tv_sec));
181181

182-
snprintf (str, STRING_LENGTH, "%-9s %s.%03u [%ld]: ",
182+
snprintf (str, STRING_LENGTH, "%-9s %s.%03lu [%ld]: ",
183183
syslog_level[level], time_string,
184-
nowtime.tv_nsec/1000000u,
184+
(unsigned long) nowtime.tv_nsec/1000000ul,
185185
(long int) getpid ());
186186

187187
/*

0 commit comments

Comments
 (0)