conf-parser: Remove redundant feof() call

fgets() returns NULL in case there's an error or f is at EOF. The
while condition just checked that f is not at EOF, therefore an error
must have happened.
This commit is contained in:
Tanu Kaskinen 2012-06-30 12:58:40 +03:00
parent 259be540e3
commit 6733caf114

View file

@ -185,9 +185,6 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_p
while (!feof(f)) { while (!feof(f)) {
if (!fgets(state.buf, sizeof(state.buf), f)) { if (!fgets(state.buf, sizeof(state.buf), f)) {
if (feof(f))
break;
pa_log_warn("Failed to read configuration file '%s': %s", filename, pa_cstrerror(errno)); pa_log_warn("Failed to read configuration file '%s': %s", filename, pa_cstrerror(errno));
goto finish; goto finish;
} }