diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-12-02 13:02:05 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-12-02 13:02:05 +0100 |
commit | 2d139b5a28a9e65d60e44c46790828991960586a (patch) | |
tree | d00403b81edc4008239d881b89532e62db93e0e2 /FICS | |
parent | a44818e3b6939d11973d3feb14f4755b73ea71a2 (diff) |
RemoveHistGame: changed while loop
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/gamedb.c | 8 |
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); |