logrotate(): Ignore any error from rename(), file may not exist

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-10-18 22:57:18 +02:00
parent 03a33fc0ee
commit f949017596
+1 -1
View File
@@ -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);