diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-20 22:13:19 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-20 22:13:19 +0100 |
commit | 63fdfba44a4509947823fc0e10ce3213bbb81b33 (patch) | |
tree | 59b827bac5eb8c4a1bf2ceed6bf8ef0ea178bcd1 /FICS/eco.c | |
parent | 2c4f9d42ebed37a73b22a5edb900444428f44bd5 (diff) |
Fixed ignored retvals
Diffstat (limited to 'FICS/eco.c')
-rw-r--r-- | FICS/eco.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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); |