From 1fe3c311ca7d4412bb7194ce471094c46f6396a1 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 5 Nov 2019 10:20:50 +0100 Subject: [PATCH] Ignore return value from rename() to silence Coverity Scan If we cannot rename our own files we're in a bit of a pickle. Signed-off-by: Joachim Nilsson --- src/syslogd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syslogd.c b/src/syslogd.c index a1f428e..76cd673 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -1495,7 +1495,7 @@ void logrotate(struct filed *f) /* newFile == "f.0" now */ sprintf(newFile, "%s.0", f->f_un.f_fname); - rename(f->f_un.f_fname, newFile); + (void)rename(f->f_un.f_fname, newFile); close(f->f_file); f->f_file = open(f->f_un.f_fname, O_WRONLY | O_APPEND | O_CREAT | O_NONBLOCK | O_NOCTTY, 0644); }