aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
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.