diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-04-17 21:26:34 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-04-17 21:26:34 +0000 |
commit | 571ac26f69c319b84f8191b38e5307d0ddf6174c (patch) | |
tree | db38226d5245e61d57661edca51fca2fc1e5c02e /sysdeps/posix/preadv.c | |
parent | 17a5b24e01f8f040c9f39d4e7178112026f28fd1 (diff) | |
download | glibc-571ac26f69c319b84f8191b38e5307d0ddf6174c.tar.gz glibc-571ac26f69c319b84f8191b38e5307d0ddf6174c.tar.xz glibc-571ac26f69c319b84f8191b38e5307d0ddf6174c.zip |
* sysdeps/posix/preadv.c: Reading of zero bytes is no error.
* sysdeps/posix/readv.c: Likewise. Reported by Markus Armbruster <armbru@redhat.com>.
Diffstat (limited to 'sysdeps/posix/preadv.c')
-rw-r--r-- | sysdeps/posix/preadv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/posix/preadv.c b/sysdeps/posix/preadv.c index e697604c19..3d975226cf 100644 --- a/sysdeps/posix/preadv.c +++ b/sysdeps/posix/preadv.c @@ -83,7 +83,7 @@ PREADV (int fd, const struct iovec *vector, int count, OFF_T offset) /* Read the data. */ ssize_t bytes_read = PREAD (fd, buffer, bytes, offset); - if (bytes_read <= 0) + if (bytes_read < 0) return -1; /* Copy the data from BUFFER into the memory specified by VECTOR. */ |