aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/gamedb.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/gamedb.c')
-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);