diff options
-rw-r--r-- | src/common/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c index a7a35acc9..2e0f39c96 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -380,7 +380,7 @@ write_str_to_file(const char *fname, const char *str) strerror(errno)); close(fd); return -1; } - if (fputs(str,file)) { + if (fputs(str,file) == EOF) { log(LOG_ERR, "Error writing to %s: %s", tempname, strerror(errno)); fclose(file); return -1; } |