From: Bruno Haible Date: Mon, 3 Sep 2001 14:09:56 +0000 (+0000) Subject: Better I/O error checking. X-Git-Tag: v0.11~521 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee107084cf0b0dc8d0168019f0bdcdd850491500;p=thirdparty%2Fgettext.git Better I/O error checking. --- diff --git a/src/ChangeLog b/src/ChangeLog index e3b4e8cab..14b8f1daf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2001-09-01 Bruno Haible + + * write-po.c (msgdomain_list_print): Before fclose, check for ferror. + 2001-09-01 Bruno Haible * message.c (message_list_list_search): If the first match has an diff --git a/src/write-po.c b/src/write-po.c index f94f436a1..e9c22800b 100644 --- a/src/write-po.c +++ b/src/write-po.c @@ -918,7 +918,7 @@ msgdomain_list_print (mdlp, filename, force, debug) } /* Make sure nothing went wrong. */ - if (fflush (fp)) + if (fflush (fp) || ferror (fp)) error (EXIT_FAILURE, errno, _("error while writing \"%s\" file"), filename); fclose (fp);