diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-27 02:13:20 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-27 02:13:20 +0100 |
commit | 431727a0ac00039893fdf4be0895afd04e03d2af (patch) | |
tree | 139d257a93ff88533bdad1cbd8060aff3e506d21 /FICS | |
parent | 6eb1fd3ee280a87d8074adabf6694a0aeeaf456b (diff) |
Fixed ignored retvals
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/makerank.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/FICS/makerank.c b/FICS/makerank.c index ca3b65a..aed86fa 100644 --- a/FICS/makerank.c +++ b/FICS/makerank.c @@ -137,9 +137,8 @@ LoadEntries(void) continue; while (1) { - fgets(e.name, sizeof(e.name), fpPlayerList); - - if (feof(fpPlayerList)) + if (fgets(e.name, sizeof(e.name), fpPlayerList) == NULL || + feof(fpPlayerList)) break; len = strlen(e.name); @@ -194,9 +193,8 @@ SetComputers(int n) return 0; while (i < n) { - fgets(comp, sizeof comp, fpComp); - - if (feof(fpComp)) + if (fgets(comp, sizeof comp, fpComp) == NULL || + feof(fpComp)) break; comp[strlen(comp) - 1] = '\0'; |