* sysdeps/mach/hurd/recv.c (__recv): Initialize NPORTS. cvs/fedora-glibc-20080703T1203
authorRoland McGrath <roland@gnu.org>
Wed, 2 Jul 2008 19:35:02 +0000 (19:35 +0000)
committerRoland McGrath <roland@gnu.org>
Wed, 2 Jul 2008 19:35:02 +0000 (19:35 +0000)
* sysdeps/mach/hurd/recvfrom.c (__recvfrom): Likewise.
* sysdeps/mach/hurd/recvmsg.c (__recvmsg): Likewise.
* hurd/fd-read.c (_hurd_fd_read): Initialize NREAD.
* hurd/get-host.c (_hurd_get_host_config): Likewise.
* sysdeps/mach/hurd/dl-sysdep.c (__libc_read): Likewise.

ChangeLog
hurd/fd-read.c
hurd/get-host.c
sysdeps/mach/hurd/dl-sysdep.c
sysdeps/mach/hurd/recv.c
sysdeps/mach/hurd/recvfrom.c
sysdeps/mach/hurd/recvmsg.c

index cce636e..63be53e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * sysdeps/mach/hurd/sendto.c (__sendfrom): Likewise.
        * sysdeps/mach/hurd/sendmsg.c (__sendmsg): Likewise.
 
+2008-03-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+       * sysdeps/mach/hurd/recv.c (__recv): Initialize NPORTS.
+       * sysdeps/mach/hurd/recvfrom.c (__recvfrom): Likewise.
+       * sysdeps/mach/hurd/recvmsg.c (__recvmsg): Likewise.
+       * hurd/fd-read.c (_hurd_fd_read): Initialize NREAD.
+       * hurd/get-host.c (_hurd_get_host_config): Likewise.
+       * sysdeps/mach/hurd/dl-sysdep.c (__libc_read): Likewise.
+
 2008-06-27  Ulrich Drepper  <drepper@redhat.com>
 
        [BZ #6657]
index 55dbc24..388a4db 100644 (file)
@@ -35,6 +35,7 @@ _hurd_fd_read (struct hurd_fd *fd, void *buf, size_t *nbytes, loff_t offset)
     }
 
   data = buf;
+  nread = *nbytes;
   if (err = HURD_FD_PORT_USE (fd, _hurd_ctty_input (port, ctty, readfd)))
     return err;
 
index bebad89..3fe0b3e 100644 (file)
@@ -51,6 +51,7 @@ _hurd_get_host_config (const char *item, char *buf, size_t buflen)
     }
 
   data = buf;
+  nread = buflen;
   err = __io_read (config, &data, &nread, -1, buflen);
   if (! err)
     /* Check if there is more in the file we didn't read.  */
index 668aaaf..2440682 100644 (file)
@@ -367,6 +367,7 @@ __libc_read (int fd, void *buf, size_t nbytes)
   mach_msg_type_number_t nread;
 
   data = buf;
+  nread = nbytes;
   err = __io_read ((mach_port_t) fd, &data, &nread, -1, nbytes);
   if (err)
     return __hurd_fail (err);
index a01e609..0cf6b7c 100644 (file)
@@ -38,7 +38,7 @@ __recv (fd, buf, n, flags)
   char *bufp = buf;
   mach_msg_type_number_t nread = n;
   mach_port_t *ports;
-  mach_msg_type_number_t nports;
+  mach_msg_type_number_t nports = 0;
   char *cdata = NULL;
   mach_msg_type_number_t clen = 0;
 
index d30bc40..2aca570 100644 (file)
@@ -41,7 +41,7 @@ __recvfrom (fd, buf, n, flags, addrarg, addr_len)
   char *bufp = buf;
   mach_msg_type_number_t nread = n;
   mach_port_t *ports;
-  mach_msg_type_number_t nports;
+  mach_msg_type_number_t nports = 0;
   char *cdata = NULL;
   mach_msg_type_number_t clen = 0;
   struct sockaddr *addr = addrarg.__sockaddr__;
index 15f9fb1..33897b8 100644 (file)
@@ -34,7 +34,7 @@ __libc_recvmsg (int fd, struct msghdr *message, int flags)
   char *data = NULL;
   mach_msg_type_number_t len = 0;
   mach_port_t *ports;
-  mach_msg_type_number_t nports;
+  mach_msg_type_number_t nports = 0;
   char *cdata = NULL;
   mach_msg_type_number_t clen = 0;
   size_t amount;