From e0411a3a562ecb7c7c43027bb1f2cce015b4073e Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Fri, 3 Jan 2020 09:51:48 +0100 Subject: [PATCH] Fix invalid format specifier for f_prevcount, found by Coverity Scan Signed-off-by: Joachim Nilsson --- src/syslogd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/syslogd.c b/src/syslogd.c index 88299f0..f26bd0e 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -1236,7 +1236,7 @@ static void logmsg(struct buf_msg *buffer) !strcmp(saved, f->f_prevline)) { f->f_lasttime = buffer->timestamp; f->f_prevcount++; - logit("msg repeated %d times, %ld sec of %d.\n", + logit("msg repeated %lu times, %ld sec of %d.\n", f->f_prevcount, timer_now() - f->f_time, repeatinterval[f->f_repeatcount]); @@ -1915,7 +1915,7 @@ void doflush(void *arg) } if (f->f_prevcount && timer_now() >= REPEATTIME(f)) { - logit("flush %s: repeated %d times, %d sec.\n", + logit("flush %s: repeated %lu times, %d sec.\n", TypeNames[f->f_type], f->f_prevcount, repeatinterval[f->f_repeatcount]); fprintlog_successive(f, 0);