m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/src/freeze.c,v [branch-1_4]


From: Eric Blake
Subject: Changes to m4/src/freeze.c,v [branch-1_4]
Date: Mon, 24 Jul 2006 20:02:18 +0000

CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      06/07/24 20:02:16

Index: src/freeze.c
===================================================================
RCS file: /sources/m4/m4/src/freeze.c,v
retrieving revision 1.1.1.1.2.10
retrieving revision 1.1.1.1.2.11
diff -u -b -r1.1.1.1.2.10 -r1.1.1.1.2.11
--- src/freeze.c        19 Jul 2006 14:55:53 -0000      1.1.1.1.2.10
+++ src/freeze.c        24 Jul 2006 20:02:16 -0000      1.1.1.1.2.11
@@ -148,7 +148,8 @@
   /* All done.  */
 
   fputs ("# End of frozen state file\n", file);
-  fclose (file);
+  if (close_stream (file) != 0)
+    M4ERROR ((EXIT_FAILURE, errno, "unable to create frozen state"));
 }
 
 /*----------------------------------------------------------------------.
@@ -367,7 +368,9 @@
 
   free (string[0]);
   free (string[1]);
-  fclose (file);
+  errno = 0;
+  if (ferror (file) || fclose (file) != 0)
+    M4ERROR ((EXIT_FAILURE, errno, "unable to read frozen state"));
 
 #undef GET_CHARACTER
 #undef GET_DIRECTIVE




reply via email to

[Prev in Thread] Current Thread [Next in Thread]