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

+2 -2
View File
@@ -364,9 +364,9 @@
char variantTypeBuf[400]; \
if (fgetc(f) != '@') return false; \
/* First read the name of the type */ \
char c = fgetc(f); \
int c = fgetc(f); \
unsigned int i = 0; \
while (c != '@' && !feof(f) && !ferror(f) && i < sizeof(variantTypeBuf) - 1) { \
while (c != '@' && c != EOF && i < sizeof(variantTypeBuf) - 1) { \
variantTypeBuf[i++] = c; \
c = fgetc(f); \
} \