1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 17:27:34 +00:00

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
parent c1823d8a34
commit 1208f3fd75
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)); struct cmsghdr* next = (struct cmsghdr*)((char*)cmsg + CMSG_ALIGN(cmsg->cmsg_len));
unsigned offset = (char*)next - (char*)msg->msg_control; unsigned offset = (char*)next - (char*)msg->msg_control;
if (msg->msg_controllen < offset + sizeof(struct cmsghdr)) if (msg->msg_controllen < offset + sizeof(struct cmsghdr))
return nullptr; return NULL;
return next; return next;
} }

View file

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