opnsense-ports/sysutils/fcron/files/patch-fileconf.c
Franco Fichtner 07beb9a857 */*: sync with upstream
Taken from: FreeBSD
2016-07-30 20:28:24 +02:00

15 lines
511 B
C

We don't need to fflush the file, since it is opened read-only.
--- fileconf.c.orig 2016-06-26 17:42:39 UTC
+++ fileconf.c
@@ -278,10 +278,6 @@ read_file(char *filename, int fd)
cf->cf_next = file_base;
file_base = cf;
- /* don't close as underlying fd may still be used by calling function */
- if (fflush(file) != 0)
- error_e("could not fflush() file_name");
-
Free_safe(default_line.cl_runas);
Free_safe(default_line.cl_mailfrom);
Free_safe(default_line.cl_mailto);