projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
259be54
)
conf-parser: Remove redundant feof() call
author
Tanu Kaskinen
<tanuk@iki.fi>
Sat, 30 Jun 2012 09:58:40 +0000
(12:58 +0300)
committer
Tanu Kaskinen
<tanuk@iki.fi>
Fri, 22 Mar 2013 19:14:08 +0000
(21:14 +0200)
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
patch
|
blob
|
history
diff --git
a/src/pulsecore/conf-parser.c
b/src/pulsecore/conf-parser.c
index 062fa8e5d09173f1869b5c593eee3b1d3fec1628..0c7444d718b5359abf692e2956ff65726e394d80 100644
(file)
--- 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;
}