aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-11-20 22:25:11 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-11-20 22:25:11 +0100
commit3749e5361f0f805b153ab9768e737f2cec150db3 (patch)
tree1f2e5324b2020db96deeb131268138d2680d3a6d /FICS
parent42e5857a7b042d3756463ec151b41c202cb7e2d7 (diff)
Fixed ignored retvals
Diffstat (limited to 'FICS')
-rw-r--r--FICS/eco.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/FICS/eco.c b/FICS/eco.c
index d7943c0..7bcc83f 100644
--- a/FICS/eco.c
+++ b/FICS/eco.c
@@ -154,9 +154,9 @@ ECO_init(void)
(void) strlcat(FENpos, onMove, sizeof FENpos);
(void) strlcpy(ptmp, "", sizeof tmp);
- fgets(ptmp, sizeof tmp, fp);
- if (feof(fp))
- continue;
+ if (fgets(ptmp, sizeof tmp, fp) == NULL ||
+ feof(fp))
+ break;
sscanf(ptmp, "%[0-z]", ECO);
if ((ECO_book[i] = malloc(sizeof(ECO_entry))) == NULL)
@@ -213,9 +213,9 @@ NIC_init(void)
(void) strlcat(FENpos, onMove, sizeof FENpos);
(void) strlcpy(ptmp, "", sizeof tmp);
- fgets(ptmp, sizeof tmp, fp);
- if (feof(fp))
- continue;
+ if (fgets(ptmp, sizeof tmp, fp) == NULL ||
+ feof(fp))
+ break;
sscanf(ptmp, "%[.-z]", NIC);
if ((NIC_book[i] = malloc(sizeof(NIC_entry))) == NULL)
@@ -266,9 +266,9 @@ LONG_init(void)
(void) strlcat(FENpos, onMove, sizeof FENpos);
(void) strlcpy(ptmp, "", sizeof tmp);
- fgets(ptmp, sizeof tmp, fp);
- if (feof(fp))
- continue;
+ if (fgets(ptmp, sizeof tmp, fp) == NULL ||
+ feof(fp))
+ break;
sscanf(ptmp, "%[^*\n]", LONG);
if ((LONG_book[i] = malloc(sizeof(LONG_entry))) == NULL)