Remove use of feof and ferror as it is not needed as the return of fgetc

is sufficent.
This commit is contained in:
Patrick Pelissier committed 2017-08-19 21:05:55 +02:00
1 parent 7ddb7e63b7
commit 44cdfa0c77
8 files changed
+21 -21

No files matched your search

+3 -3
View File
@@ -947,7 +947,7 @@ typedef enum {
RBTREEI_CONTRACT(rbtree); \
assert (file != NULL); \
M_C(name,_clean)(rbtree); \
char c = fgetc(file); \
int c = fgetc(file); \
if (c != '[') return false; \
c = fgetc(file); \
if (c == ']') return true; \
@@ -957,9 +957,9 @@ typedef enum {
do { \
bool b = M_GET_IN_STR oplist (item, file); \
c = fgetc(file); \
if (!b) break; \
if (b == false || c == EOF) break; \
M_C(name, _push)(rbtree, item); \
} while (c == M_GET_SEPARATOR oplist && !feof(file) && !ferror(file)); \
} while (c == M_GET_SEPARATOR oplist); \
M_GET_CLEAR oplist (item); \
return c == ']'; \
} \