From: Frederic Marchal Date: Tue, 16 Dec 2014 20:31:01 +0000 (+0100) Subject: Check for the correct fclose return code. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f00fa3887652f9206f6a3cf99c2bd131ee9a5f9;p=thirdparty%2Fsarg.git Check for the correct fclose return code. --- diff --git a/denied.c b/denied.c index 0452148..e5dbae1 100644 --- a/denied.c +++ b/denied.c @@ -174,7 +174,7 @@ void gen_denied_report(void) fputs("\n",fp_ou); if (write_html_trailer(fp_ou)<0) debuga(_("Write error in file %s\n"),report); - if (fclose(fp_ou)<0) + if (fclose(fp_ou)==EOF) debuga(_("Failed to close file %s - %s\n"),report,strerror(errno)); if (!KeepTempLog && unlink(denied_in)==-1)