LibC: We still need to use NULL (not nullptr) in C headers

Thanks to @alimpfard for noticing this.
This commit is contained in:
Andreas Kling 2020-10-14 13:57:51 +02:00
commit 1208f3fd75
Notes: sideshowbarker 2024-07-19 01:54:22 +09:00
2 changed files with 3 additions and 3 deletions

View file

@ -169,7 +169,7 @@ static inline struct cmsghdr* CMSG_NXTHDR(struct msghdr* msg, struct cmsghdr* cm
struct cmsghdr* next = (struct cmsghdr*)((char*)cmsg + CMSG_ALIGN(cmsg->cmsg_len));
unsigned offset = (char*)next - (char*)msg->msg_control;
if (msg->msg_controllen < offset + sizeof(struct cmsghdr))
return nullptr;
return NULL;
return next;
}

View file

@ -132,7 +132,7 @@ CODE prioritynames[] = {
{ "none", INTERNAL_NOPRI },
{ "notice", LOG_NOTICE },
{ "warning", LOG_WARNING },
{ nullptr, -1 },
{ NULL, -1 },
};
CODE facilitynames[] = {
@ -158,7 +158,7 @@ CODE facilitynames[] = {
{ "syslog", LOG_SYSLOG },
{ "user", LOG_USER },
{ "uucp", LOG_UUCP },
{ nullptr, -1 },
{ NULL, -1 },
};
#endif