aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/eco.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/eco.c')
-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);