mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
Use (void*) instead of 0 for return value pointer in __cmsg_nexthdr
This commit is contained in:
parent
3f8cc204fd
commit
f19009c155
@ -1,5 +1,12 @@
|
||||
2011-09-09 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* sysdeps/unix/bsd/bsd4.4/bits/socket.h (__cmsg_nxthdr): Use NULL
|
||||
instead of 0.
|
||||
* sysdeps/unix/sysv/linux/bits/socket.h (__cmsg_nxthdr): Use (void*)0
|
||||
instead of 0. .
|
||||
* sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise.
|
||||
Patch in part by Pavel Roskin <proski@gnu.org>.
|
||||
|
||||
[BZ #13138]
|
||||
* stdio-common/vfscanf.c (ADDW): Allocate large memory block with
|
||||
realloc.
|
||||
|
@ -236,7 +236,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 NULL;
|
||||
|
||||
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
|
||||
+ CMSG_ALIGN (__cmsg->cmsg_len));
|
||||
@ -245,7 +245,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 NULL;
|
||||
return __cmsg;
|
||||
}
|
||||
#endif /* Use `extern inline'. */
|
||||
|
@ -318,7 +318,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 (void *) 0;
|
||||
|
||||
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
|
||||
+ CMSG_ALIGN (__cmsg->cmsg_len));
|
||||
@ -327,7 +327,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 (void *) 0;
|
||||
return __cmsg;
|
||||
}
|
||||
#endif /* Use `extern inline'. */
|
||||
|
@ -318,7 +318,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 (void *) 0;
|
||||
|
||||
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
|
||||
+ CMSG_ALIGN (__cmsg->cmsg_len));
|
||||
@ -327,7 +327,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 (void *) 0;
|
||||
return __cmsg;
|
||||
}
|
||||
#endif /* Use `extern inline'. */
|
||||
|
Loading…
Reference in New Issue
Block a user