mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 22:13:01 +07:00
Ignore return value from rename(), ofile may not exist yet.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ static int logrotate(char *file, int num, off_t sz)
|
||||
snprintf(nfile, len, "%s.%d.gz", file, cnt);
|
||||
|
||||
/* May fail because ofile doesn't exist yet, ignore. */
|
||||
rename(ofile, nfile);
|
||||
(void)rename(ofile, nfile);
|
||||
}
|
||||
|
||||
for (cnt = num; cnt > 0; cnt--) {
|
||||
|
||||
Reference in New Issue
Block a user