diff options
| author | Markus Uhlin <markus@nifty-networks.net> | 2026-03-14 22:48:17 +0100 |
|---|---|---|
| committer | Markus Uhlin <markus@nifty-networks.net> | 2026-03-14 22:48:17 +0100 |
| commit | 030d81d72f2a1d09c57a689c46593c463249e86c (patch) | |
| tree | 1d5eea8701687d22a21cdc954249631a8ab5da69 | |
| parent | fab36a57f296665ce8ab27d97b6664deaa1a1ad1 (diff) | |
WriteMsgFile: check the return value of fclose()
| -rw-r--r-- | FICS/playerdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c index 909417d..8b3cb0d 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -2911,10 +2911,11 @@ WriteMsgFile(int p, textlist *Head) close(fd); return 0; } + for (Cur = Head; Cur != NULL; Cur = Cur->next) fprintf(fp, "%s", Cur->text); - fclose(fp); - return 1; + + return (fclose(fp) == 0 ? 1 : 0); } PUBLIC int |
