]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Cast __cmsg_nxthdr return value for MIPS.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 13 Sep 2011 16:04:03 +0000 (16:04 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 13 Sep 2011 16:04:03 +0000 (16:04 +0000)
ChangeLog.mips
sysdeps/unix/sysv/linux/mips/bits/socket.h

index b99b3386c82b44f6c7b984ff447ce265c3b9a76a..8da2af2fbab0406256bf2119299f20984f700888 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-13  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Cast
+       return value to (struct cmsghdr *).
+
 2011-09-13  Joseph Myers  <joseph@codesourcery.com>
 
        * sysdeps/mips/elf/configure.in: Always test for TLS support and
index 2399490926bc42c54c93c3993bd7388190a8ae7c..4aacfae9945355f1a37527aa58284378c1d12a85 100644 (file)
@@ -312,7 +312,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
 {
   if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
     /* The kernel header does this so there may be a reason.  */
-    return 0;
+    return (struct cmsghdr *) 0;
 
   __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
                               + CMSG_ALIGN (__cmsg->cmsg_len));
@@ -321,7 +321,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
       || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
          > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
     /* No more entries.  */
-    return 0;
+    return (struct cmsghdr *) 0;
   return __cmsg;
 }
 #endif /* Use `extern inline'.  */