changeset 5837:09b5be18ba0e

fdopen returns NULL when it fails.
author Marcus Crestani <marcus@crestani.de>
date Sat, 13 Dec 2014 13:58:16 +0100
parents c03dd89e0055
children b1500f1ec617
files src/ChangeLog src/dumper.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Dec 08 16:27:09 2014 -0700
+++ b/src/ChangeLog	Sat Dec 13 13:58:16 2014 +0100
@@ -1,3 +1,7 @@
+2014-12-13  Marcus Crestani  <crestani@xemacs.org>
+
+	* dumper.c (pdump): fdopen returns NULL when it fails.
+
 2014-12-05  Jerry James  <james@xemacs.org>
 
 	* src/fileio.c (Ffile_truename): Fix off-by-one error.
--- a/src/dumper.c	Mon Dec 08 16:27:09 2014 -0700
+++ b/src/dumper.c	Sat Dec 13 13:58:16 2014 +0100
@@ -2135,7 +2135,7 @@
     report_file_error ("Unable to open dump file",
 		       build_ascstring (EMACS_PROGNAME ".dmp"));
   pdump_out = fdopen (pdump_fd, "w");
-  if (pdump_out < 0)
+  if (pdump_out == NULL)
     report_file_error ("Unable to open dump file for writing",
 		       build_ascstring (EMACS_PROGNAME ".dmp"));