From 6733caf114d0d759590459745c864aa9518d133d Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sat, 30 Jun 2012 12:58:40 +0300 Subject: [PATCH] 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. --- src/pulsecore/conf-parser.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c index 062fa8e5d..0c7444d71 100644 --- a/src/pulsecore/conf-parser.c +++ b/src/pulsecore/conf-parser.c @@ -185,9 +185,6 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_p while (!feof(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)); goto finish; }