musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stdio/__stdio_read.c 2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/__stdio_read.c b/src/stdio/__stdio_read.c
index f8fa6d3b..af50508c 100644
--- a/src/stdio/__stdio_read.c
+++ b/src/stdio/__stdio_read.c
@@ -11,7 +11,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 |= F_EOF ^ ((F_ERR^F_EOF) & cnt);
+ f->flags |= cnt ? F_ERR : F_EOF;
return cnt;
}
if (cnt <= iov[0].iov_len) return cnt;
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月01日 15:44:15 +0000

AltStyle によって変換されたページ (->オリジナル) /