aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-12-02 15:22:03 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-12-02 15:22:03 +0100
commit92644d6b212f3835051c4ebe8fa86ccd1b7756f4 (patch)
treec75ca60ca99197ea36e910872f8fad694af2c525
parent796a9c0565610447a890d1576880ae52b7e1680b (diff)
LoadMsgs: changed the while loop
-rw-r--r--FICS/playerdb.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 2ac7389..7cc577c 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -2546,12 +2546,7 @@ LoadMsgs(int p, int which, textlist **Head)
if ((fp = fopen(fName, "r")) == NULL)
return -1;
- while (!feof(fp)) {
- fgets(line, sizeof line, fp);
-
- if (feof(fp))
- break;
-
+ while (fgets(line, sizeof line, fp) != NULL) {
if (SaveThisMsg(which, line)) {
SaveTextListEntry(Cur, line, ++n);
Cur = &(*Cur)->next;