aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/playerdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r--FICS/playerdb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 9bd0901..9dd59b0 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -1798,13 +1798,15 @@ player_lastconnect(int p)
loginName, &lval, &registered, ipstr) != 5) {
(void) fprintf(stderr, "FICS: "
"Error in login info format. %s\n", fname);
- fclose(fp);
+ if (fclose(fp) != 0) {
+ warn("%s: error closing file pointer",
+ __func__);
+ }
return 0;
}
}
- fclose(fp);
- return last;
+ return (fclose(fp) == 0 ? last : 0);
}
PUBLIC time_t