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
@@ -681,7 +681,7 @@
ARRAYI_CONTRACT(array); \
assert (file != NULL); \
M_C(name,_clean)(array); \
char c = fgetc(file); \
int c = fgetc(file); \
if (c != '[') return false; \
c = fgetc(file); \
if (c == ']') return true; \
@@ -691,9 +691,9 @@
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_back)(array, item); \
} while (c == M_GET_SEPARATOR oplist && !feof(file) && !ferror(file)); \
} while (c == M_GET_SEPARATOR oplist); \
M_GET_CLEAR oplist (item); \
ARRAYI_CONTRACT(array); \
return c == ']'; \