Mercurial > hg > xemacs-beta
comparison src/dumper.c @ 5837:09b5be18ba0e
fdopen returns NULL when it fails.
author | Marcus Crestani <marcus@crestani.de> |
---|---|
date | Sat, 13 Dec 2014 13:58:16 +0100 |
parents | 86d33ddc7fd6 |
children | b1500f1ec617 |
comparison
equal
deleted
inserted
replaced
5836:c03dd89e0055 | 5837:09b5be18ba0e |
---|---|
2133 O_WRONLY | O_CREAT | O_TRUNC | OPEN_BINARY, 0666); | 2133 O_WRONLY | O_CREAT | O_TRUNC | OPEN_BINARY, 0666); |
2134 if (pdump_fd < 0) | 2134 if (pdump_fd < 0) |
2135 report_file_error ("Unable to open dump file", | 2135 report_file_error ("Unable to open dump file", |
2136 build_ascstring (EMACS_PROGNAME ".dmp")); | 2136 build_ascstring (EMACS_PROGNAME ".dmp")); |
2137 pdump_out = fdopen (pdump_fd, "w"); | 2137 pdump_out = fdopen (pdump_fd, "w"); |
2138 if (pdump_out < 0) | 2138 if (pdump_out == NULL) |
2139 report_file_error ("Unable to open dump file for writing", | 2139 report_file_error ("Unable to open dump file for writing", |
2140 build_ascstring (EMACS_PROGNAME ".dmp")); | 2140 build_ascstring (EMACS_PROGNAME ".dmp")); |
2141 | 2141 |
2142 retry_fwrite (&header, sizeof (header), 1, pdump_out); | 2142 retry_fwrite (&header, sizeof (header), 1, pdump_out); |
2143 PDUMP_ALIGN_OUTPUT (max_align_t); | 2143 PDUMP_ALIGN_OUTPUT (max_align_t); |