diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-20 22:25:11 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-20 22:25:11 +0100 |
commit | 3749e5361f0f805b153ab9768e737f2cec150db3 (patch) | |
tree | 1f2e5324b2020db96deeb131268138d2680d3a6d /FICS | |
parent | 42e5857a7b042d3756463ec151b41c202cb7e2d7 (diff) |
Fixed ignored retvals
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/eco.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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) |