aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-11-20 22:13:19 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-11-20 22:13:19 +0100
commit63fdfba44a4509947823fc0e10ce3213bbb81b33 (patch)
tree59b827bac5eb8c4a1bf2ceed6bf8ef0ea178bcd1 /FICS
parent2c4f9d42ebed37a73b22a5edb900444428f44bd5 (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 46280aa..9afe4c7 100644
--- a/FICS/eco.c
+++ b/FICS/eco.c
@@ -141,10 +141,10 @@ ECO_init(void)
while (!feof(fp)) {
(void) strlcpy(ptmp, "", sizeof tmp);
- fgets(ptmp, sizeof tmp, fp);
- if (feof(fp))
- continue;
+ if (fgets(ptmp, sizeof tmp, fp) == NULL ||
+ feof(fp))
+ break;
/* XXX */
sscanf(ptmp, "%[\x21-z] %s", FENpos, onMove);
@@ -201,10 +201,10 @@ NIC_init(void)
while (!feof(fp)) {
(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, "%[\x21-z] %s", FENpos, onMove);
(void) strlcat(FENpos, " ", sizeof FENpos);
@@ -253,10 +253,10 @@ LONG_init(void)
while (!feof(fp)) {
(void) strlcpy(ptmp, "", sizeof tmp);
- fgets(ptmp, sizeof tmp, fp);
- if (feof(fp))
- continue;
+ if (fgets(ptmp, sizeof tmp, fp) == NULL ||
+ feof(fp))
+ break;
/* XXX */
sscanf(ptmp, "%[\x21-z] %s", FENpos, onMove);