summaryrefslogtreecommitdiff
path: root/src/stdio/fread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/fread.c')
-rw-r--r--src/stdio/fread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/fread.c b/src/stdio/fread.c
index aef75f73..733d3716 100644
--- a/src/stdio/fread.c
+++ b/src/stdio/fread.c
@@ -25,7 +25,7 @@ size_t fread(void *restrict destv, size_t size, size_t nmemb, FILE *restrict f)
/* Read the remainder directly */
for (; l; l-=k, dest+=k) {
k = __toread(f) ? 0 : f->read(f, dest, l);
- if (k+1<=1) {
+ if (!k) {
FUNLOCK(f);
return (len-l)/size;
}