socket.h patch

Ragnar Hojland Espinosa (root@lightside.ddns.org)
Wed, 29 Apr 1998 13:21:13 +0200 (MET DST)


A struct cmsghdr * is returned, so we shouldn't return (void*)NULL but
(struct cmsghdr*) NULL . This only matter in C++, I guess.

____/| Ragnar Hojland (ragnar@lightside.ddns.org) Fingerprint 94C4B
\ o.O| 2F0D27DE025BE2302C
=(_)= "Thou shalt not follow the NULL pointer for 104B78C56 B72F0822
U chaos and madness await thee at its end." hkp://keys.pgp.com

--- linux-2.1.98/include/linux/socket.h.ORIG Wed Apr 29 13:16:12 1998
+++ linux-2.1.98/include/linux/socket.h Wed Apr 29 13:16:31 1998
@@ -90,10 +90,10 @@ __KINLINE struct cmsghdr * __cmsg_nxthdr
unsigned char * __ptr;

if (__cmsg->cmsg_len < sizeof(struct cmsghdr))
- return NULL;
+ return (struct cmsghdr*) NULL;
__ptr = ((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len);
if (__ptr >= (unsigned char *) __ctl + __size)
- return NULL;
+ return (struct cmsghdr*) NULL;

return (struct cmsghdr *) __ptr;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu