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:
6733caf
)
Revert "conf-parser: Remove redundant feof() call"
author
Tanu Kaskinen
<tanuk@iki.fi>
Sat, 23 Mar 2013 06:38:43 +0000
(08:38 +0200)
committer
Tanu Kaskinen
<tanuk@iki.fi>
Sat, 23 Mar 2013 06:38:43 +0000
(08:38 +0200)
This reverts commit
6733caf114d0d759590459745c864aa9518d133d
.
Apparently, the EOF bit gets set only after there has been an attempt
to read more data than the file contains, so just reading the last
byte isn't sufficient.
src/pulsecore/conf-parser.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/conf-parser.c
b/src/pulsecore/conf-parser.c
index
0c7444d
..
062fa8e
100644
(file)
--- a/
src/pulsecore/conf-parser.c
+++ b/
src/pulsecore/conf-parser.c
@@
-185,6
+185,9
@@
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;
}