about summary refs log tree commit diff
path: root/src/stdio/__stdio_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/__stdio_read.c')
-rw-r--r--src/stdio/__stdio_read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/__stdio_read.c b/src/stdio/__stdio_read.c
index af50508c..909c36a9 100644
--- a/src/stdio/__stdio_read.c
+++ b/src/stdio/__stdio_read.c
@@ -12,7 +12,7 @@ size_t __stdio_read(FILE *f, unsigned char *buf, size_t len)
 	cnt = syscall(SYS_readv, f->fd, iov, 2);
 	if (cnt <= 0) {
 		f->flags |= cnt ? F_ERR : F_EOF;
-		return cnt;
+		return 0;
 	}
 	if (cnt <= iov[0].iov_len) return cnt;
 	cnt -= iov[0].iov_len;