]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Better I/O error checking.
authorBruno Haible <bruno@clisp.org>
Mon, 3 Sep 2001 14:09:56 +0000 (14:09 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 3 Sep 2001 14:09:56 +0000 (14:09 +0000)
src/ChangeLog
src/write-po.c

index e3b4e8cab8cb92407bb40f11d26c8f3d28898290..14b8f1dafd625f7d65ecb0683036b5e32e194446 100644 (file)
@@ -1,3 +1,7 @@
+2001-09-01  Bruno Haible  <haible@clisp.cons.org>
+
+       * write-po.c (msgdomain_list_print): Before fclose, check for ferror.
+
 2001-09-01  Bruno Haible  <haible@clisp.cons.org>
 
        * message.c (message_list_list_search): If the first match has an
index f94f436a1cdbdab7dd54eabbfa9567818d42a850..e9c22800b6e88258a6754828d4b83e2c657418e8 100644 (file)
@@ -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);