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 <troglobit@gmail.com>
This commit is contained in:
parent
58b243ea55
commit
1fe3c311ca
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user