mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
Revert "conf-parser: Remove redundant feof() call"
This reverts commit 6733caf114.
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.
This commit is contained in:
parent
6733caf114
commit
34fa29bd06
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue