aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-11-27 02:13:20 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-11-27 02:13:20 +0100
commit431727a0ac00039893fdf4be0895afd04e03d2af (patch)
tree139d257a93ff88533bdad1cbd8060aff3e506d21
parent6eb1fd3ee280a87d8074adabf6694a0aeeaf456b (diff)
Fixed ignored retvals
-rw-r--r--FICS/makerank.c10
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';