aboutsummaryrefslogtreecommitdiff
path: root/user.c
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-07-28 23:55:25 +0000
committerThomas Schwinge <tschwinge@gnu.org>2006-07-28 23:55:25 +0000
commit297dd55afd2bf2bedbdb244fba4e9027b8060532 (patch)
tree067b757343dae8af82ff5f6afaba9fa0dce6d1b6 /user.c
parentcfc0bb3b0de0e1d5f96ba2b600babb2f19ce0922 (diff)
downloadmig-297dd55afd2bf2bedbdb244fba4e9027b8060532.tar.gz
mig-297dd55afd2bf2bedbdb244fba4e9027b8060532.tar.bz2
mig-297dd55afd2bf2bedbdb244fba4e9027b8060532.zip
2006-07-29 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
* migcom.c (myfclose): New function. (main): Use myfclose instead of fclose. * user.c (WriteUserIndividual): Check for errors when closing file.
Diffstat (limited to 'user.c')
-rw-r--r--user.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/user.c b/user.c
index 374edbe..8d0a2ab 100644
--- a/user.c
+++ b/user.c
@@ -1320,7 +1320,9 @@ WriteUserIndividual(const statement_t *stats)
WriteRoutine(file, stat->stRoutine);
WriteEpilog(file);
- fclose(file);
+ if (ferror(file) || fclose(file))
+ fatal("fclose(): ", filename,
+ unix_error_string(errno));
strfree(filename);
}
break;