From f9490175963cec5127761f017ebfcecef5d32ea8 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 18 Oct 2017 22:57:18 +0200 Subject: [PATCH] logrotate(): Ignore any error from rename(), file may not exist Signed-off-by: Joachim Nilsson --- src/utmp-api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utmp-api.c b/src/utmp-api.c index 92fad6a7..f119dd13 100644 --- a/src/utmp-api.c +++ b/src/utmp-api.c @@ -98,7 +98,7 @@ static int logrotate(char *file, int num, off_t sz) } } - rename(file, nfile); + (void)rename(file, nfile); create(file, st.st_mode, st.st_uid, st.st_gid); } else { truncate(file, 0);