diff options
Diffstat (limited to 'src/libstddjb/allreadwrite.c')
-rw-r--r-- | src/libstddjb/allreadwrite.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libstddjb/allreadwrite.c b/src/libstddjb/allreadwrite.c index 0e9351a..19e4c1c 100644 --- a/src/libstddjb/allreadwrite.c +++ b/src/libstddjb/allreadwrite.c @@ -1,6 +1,5 @@ /* ISC license. */ -#include <errno.h> #include <skalibs/allreadwrite.h> size_t allreadwrite (io_func_ref op, int fd, char *buf, size_t len) @@ -9,11 +8,7 @@ size_t allreadwrite (io_func_ref op, int fd, char *buf, size_t len) while (len) { ssize_t w = (*op)(fd, buf, len) ; - if (w <= 0) - { - if (!w) errno = 0 ; - break ; - } + if (w <= 0) break ; written += w ; buf += w ; len -= w ; |