aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2026-03-14 21:26:31 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2026-03-14 21:26:31 +0100
commitdc8d8d835862395c7a6886fdb49e244b1877a589 (patch)
tree679d4db15b618165e856c839247bfcb9f0d7db40 /FICS
parent9d57065f1b63a9db4c4710c3ffc25072a0ac88bf (diff)
Log fclose() errors
Diffstat (limited to 'FICS')
-rw-r--r--FICS/playerdb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 9868399..a583699 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -1154,7 +1154,10 @@ player_read(int p, char *name)
if (fgets(line, sizeof line, fp) == NULL) { // Ok, so which version
warnx("%s: fgets() error", __func__); // file?
- fclose(fp);
+
+ if (fclose(fp) != 0)
+ warn("%s: error closing file pointer", __func__);
+
return -1;
}
@@ -1195,7 +1198,8 @@ player_read(int p, char *name)
} while (!feof(fp));
}
- fclose(fp);
+ if (fclose(fp) != 0)
+ warn("%s: error closing file pointer", __func__);
if (version == 0) {
player_save(p); // Ensure old files are quickly converted e.g.