aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-12-02 13:02:05 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-12-02 13:02:05 +0100
commit2d139b5a28a9e65d60e44c46790828991960586a (patch)
treed00403b81edc4008239d881b89532e62db93e0e2 /FICS
parenta44818e3b6939d11973d3feb14f4755b73ea71a2 (diff)
RemoveHistGame: changed while loop
Diffstat (limited to 'FICS')
-rw-r--r--FICS/gamedb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c
index 3b6d025..bf9dfbe 100644
--- a/FICS/gamedb.c
+++ b/FICS/gamedb.c
@@ -1641,12 +1641,8 @@ RemoveHistGame(char *file, int maxlines)
count++;
- while (!feof(fp)) {
- fgets(line, ARRAY_SIZE(line), fp);
-
- if (!feof(fp))
- count++;
- }
+ while (fgets(line, ARRAY_SIZE(line), fp) != NULL)
+ count++;
fclose(fp);
stolower(Opponent);