From: Ben Pfaff Date: Mon, 8 May 2006 00:09:40 +0000 (+0000) Subject: Check return value of pool_fclose(). X-Git-Tag: v0.6.0~873 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3fb40cc883e985d337811913b0c180fb226c76b;p=pspp-builds.git Check return value of pool_fclose(). --- diff --git a/src/language/stats/ChangeLog b/src/language/stats/ChangeLog index 3d09f528..8794b875 100644 --- a/src/language/stats/ChangeLog +++ b/src/language/stats/ChangeLog @@ -1,3 +1,7 @@ +Sun May 7 17:09:19 2006 Ben Pfaff + + * flip.c (flip_file): Check return value of pool_fclose(). + Sat May 6 16:00:13 2006 Ben Pfaff Get rid of `char *c' member in union value, for cleanliness. diff --git a/src/language/stats/flip.c b/src/language/stats/flip.c index 3aed8323..59f0c090 100644 --- a/src/language/stats/flip.c +++ b/src/language/stats/flip.c @@ -474,7 +474,11 @@ flip_file (struct flip_pgm *flip) case_idx += read_cases; } - pool_fclose (flip->pool, input_file); + if (pool_fclose (flip->pool, input_file) == EOF) + { + msg (SE, _("Error closing FLIP source file: %s."), strerror (errno)); + return false; + } pool_unregister (flip->pool, input_buf); free (input_buf);