aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2025-03-18 22:50:29 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2025-03-18 22:50:29 +0100
commitb349af5e96619e0543467a81de5f87660f294266 (patch)
tree62da9d7321f141ff273b6ce06c437b3054e9e840 /FICS
parent0231eadfe653e5c4ee31c6ba61aff14ae6f5222e (diff)
Fixed unchecked return values
Diffstat (limited to 'FICS')
-rw-r--r--FICS/gamedb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c
index 572abf5..f94509a 100644
--- a/FICS/gamedb.c
+++ b/FICS/gamedb.c
@@ -986,11 +986,12 @@ ReadGameState(FILE *fp, game_state_t *gs, int version)
}
}
} else {
- getc(fp); /* Skip past a newline. */
+ (void) getc(fp); /* Skip past a newline. */
for (i = 0; i < 8; i++) {
for (j = 0; j < 8; j++) {
- pieceChar = getc(fp);
+ if ((pieceChar = getc(fp)) == EOF)
+ return -1;
gs->board[i][j] = CharToPiece(pieceChar);
}
}
@@ -1922,7 +1923,7 @@ addjournalitem(int p, char count2, char *WhiteName2, int WhiteRating2,
ending2,
result2);
fclose(fp2);
- rename(fname2, fname);
+ xrename(__func__, fname2, fname);
return;
} else {
_Static_assert(ARRAY_SIZE(WhiteName) > 19,