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:
		| @@ -1495,7 +1495,7 @@ void logrotate(struct filed *f) | |||||||
|  |  | ||||||
| 			/* newFile == "f.0" now */ | 			/* newFile == "f.0" now */ | ||||||
| 			sprintf(newFile, "%s.0", f->f_un.f_fname); | 			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); | 			close(f->f_file); | ||||||
| 			f->f_file = open(f->f_un.f_fname, O_WRONLY | O_APPEND | O_CREAT | O_NONBLOCK | O_NOCTTY, 0644); | 			f->f_file = open(f->f_un.f_fname, O_WRONLY | O_APPEND | O_CREAT | O_NONBLOCK | O_NOCTTY, 0644); | ||||||
| 		} | 		} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user