diff options
author | Rich Felker <dalias@aerifal.cx> | 2016-02-10 13:51:05 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2016-02-10 13:51:05 -0500 |
commit | 5a6e8d098abfef67028e6c3edbac39e0bbaf8bd8 (patch) | |
tree | eaf074215e7add4ceef02eec8c7ce9cb96ff819b /src/stdio/rewind.c | |
parent | 869a9df5b5f7da57ebd86d146e25f78450678eeb (diff) | |
download | musl-5a6e8d098abfef67028e6c3edbac39e0bbaf8bd8.tar.gz musl-5a6e8d098abfef67028e6c3edbac39e0bbaf8bd8.tar.bz2 musl-5a6e8d098abfef67028e6c3edbac39e0bbaf8bd8.tar.xz musl-5a6e8d098abfef67028e6c3edbac39e0bbaf8bd8.zip |
fix failed write reporting by fwrite in line-buffered mode
when a write error occurred while flushing output due to a newline,
fwrite falsely reported all bytes up to and including the newline as
successfully written. in general, due to buffering such "spurious
success" returns are acceptable for stdio; however for line-buffered
mode it was subtly wrong. errors were still visible via ferror() or as
a short-write return if there was more data past the newline that
should have been written, but since the contract for line-buffered
mode is that everything up through the newline be written out
immediately, a discrepency was observable in the actual file contents.
Diffstat (limited to 'src/stdio/rewind.c')
0 files changed, 0 insertions, 0 deletions