diff options
| author | Elliott Hughes <enh@google.com> | 2015-01-24 21:25:05 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-01-24 21:25:06 +0000 |
| commit | 59936a3b51474fc3216659f089ff6543ac31ab4e (patch) | |
| tree | 67156569bf455a9eb3fd18e0151e8e67dfed309c /libc | |
| parent | 31005ca4c8562f3e6dfbed079eeaff8361ff8cdc (diff) | |
| parent | e6bb5a27769cc974c4c6c1bfc96dcd07f0c0f5ef (diff) | |
| download | bionic-59936a3b51474fc3216659f089ff6543ac31ab4e.zip bionic-59936a3b51474fc3216659f089ff6543ac31ab4e.tar.gz bionic-59936a3b51474fc3216659f089ff6543ac31ab4e.tar.bz2 | |
Merge "Fix optimized fread."
Diffstat (limited to 'libc')
| -rw-r--r-- | libc/stdio/fread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdio/fread.c b/libc/stdio/fread.c index baf62b9..bac8dad 100644 --- a/libc/stdio/fread.c +++ b/libc/stdio/fread.c @@ -120,7 +120,7 @@ fread(void *buf, size_t size, size_t count, FILE *fp) while (total > 0) { ssize_t bytes_read = (*fp->_read)(fp->_cookie, dst, total); if (bytes_read <= 0) { - fp->_flags = (fp->_r == 0) ? __SEOF : __SERR; + fp->_flags |= (bytes_read == 0) ? __SEOF : __SERR; break; } dst += bytes_read; |
