From: Ulrich Drepper Date: Fri, 17 Apr 2009 21:26:34 +0000 (+0000) Subject: * sysdeps/posix/preadv.c: Reading of zero bytes is no error. X-Git-Tag: cvs/fedora-glibc-20090424T0747~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=571ac26f69c319b84f8191b38e5307d0ddf6174c;p=thirdparty%2Fglibc.git * sysdeps/posix/preadv.c: Reading of zero bytes is no error. * sysdeps/posix/readv.c: Likewise. Reported by Markus Armbruster . --- diff --git a/ChangeLog b/ChangeLog index 4b4bbdc63bd..d30e6b38591 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-04-17 Ulrich Drepper + * sysdeps/posix/preadv.c: Reading of zero bytes is no error. + * sysdeps/posix/readv.c: Likewise. + Reported by Markus Armbruster . + * malloc/hooks.c (top_check): Force hook value into register. 2009-04-16 Samuel Thibault diff --git a/sysdeps/posix/preadv.c b/sysdeps/posix/preadv.c index e697604c190..3d975226cf0 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. */ diff --git a/sysdeps/posix/readv.c b/sysdeps/posix/readv.c index 50bcc913159..6f16b9d946b 100644 --- a/sysdeps/posix/readv.c +++ b/sysdeps/posix/readv.c @@ -70,7 +70,7 @@ __libc_readv (int fd, const struct iovec *vector, int count) /* Read the data. */ ssize_t bytes_read = __read (fd, buffer, bytes); - if (bytes_read <= 0) + if (bytes_read < 0) return -1; /* Copy the data from BUFFER into the memory specified by VECTOR. */