aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2026-03-15 14:25:16 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2026-03-15 14:25:16 +0100
commit820661fd30224cc09f86018e68963c998074f9c1 (patch)
treec42884512bfa98cd72e4d285cb7d6c777e43c8c6 /FICS
parenta05ca225716e84f78527ac5454eb576437e326e2 (diff)
old_mail_moves: handle fclose() errors
Diffstat (limited to 'FICS')
-rw-r--r--FICS/obsproc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/FICS/obsproc.c b/FICS/obsproc.c
index eeceffc..d48d25c 100644
--- a/FICS/obsproc.c
+++ b/FICS/obsproc.c
@@ -727,11 +727,14 @@ old_mail_moves(int p, int mail, param_list param)
if (sscanf(ptmp, "%d", &count) != 1) {
warnx("%s: sscanf() error", __func__);
- fclose(fp);
+ (void) fclose(fp);
return COM_FAILED;
}
- fclose(fp);
+ if (fclose(fp) != 0) {
+ warn("%s: error closing file pointer", __func__);
+ return COM_FAILED;
+ }
pprintf(p, "Last game for %s was history game %d.\n", parray[p1].name,
count);