]> sourceware.org Git - glibc.git/commitdiff
* sysdeps/posix/preadv.c: Reading of zero bytes is no error.
authorUlrich Drepper <drepper@redhat.com>
Fri, 17 Apr 2009 21:26:34 +0000 (21:26 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 17 Apr 2009 21:26:34 +0000 (21:26 +0000)
* sysdeps/posix/readv.c: Likewise.
Reported by Markus Armbruster <armbru@redhat.com>.

ChangeLog
sysdeps/posix/preadv.c
sysdeps/posix/readv.c

index 4b4bbdc63bd84ab2d2e34da4ae1e7af927fb7917..d30e6b38591ad051a0b507008bd3f4ae5536e7a7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-04-17  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/posix/preadv.c: Reading of zero bytes is no error.
+       * sysdeps/posix/readv.c: Likewise.
+       Reported by Markus Armbruster <armbru@redhat.com>.
+
        * malloc/hooks.c (top_check): Force hook value into register.
 
 2009-04-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>
index e697604c190b833f5e865f45860eeb395b27e5d8..3d975226cf017db9f442617cfb952baa4dfa3f1a 100644 (file)
@@ -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.  */
index 50bcc913159fbd76ec0e28861dbcfe4b4821b803..6f16b9d946b8fa86ab7e22de6a47a6918e331023 100644 (file)
@@ -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.  */
This page took 0.052994 seconds and 5 git commands to generate.