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
@@ -794,11 +794,11 @@ string_in_str(string_t v, FILE *f)
{
STRING_CONTRACT(v);
M_ASSUME (f != NULL);
char c = fgetc(f);
int c = fgetc(f);
if (c != '"') return false;
string_clean(v);
c = fgetc(f);
while (c != '"' && !feof(f) && !ferror(f)) {
while (c != '"' && c != EOF) {
if (c == '\\') {
c = getc(f);
if (c != '"') string_push_back (v, '\\');