Use NULL instead of 0 for pointers.

malloc will return NULL if it cannot allocate memory.

MFC after:	2 weeks.
This commit is contained in:
Marcelo Araujo 2016-04-19 01:57:56 +00:00
parent f60708c9f7
commit 028d447b59
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298238

View File

@ -863,7 +863,7 @@ main(int argc, char *argv[])
/* set IP6 packet options */
if (ip6optlen) {
if ((scmsg = (char *)malloc(ip6optlen)) == 0)
if ((scmsg = (char *)malloc(ip6optlen)) == NULL)
errx(1, "can't allocate enough memory");
smsghdr.msg_control = (caddr_t)scmsg;
smsghdr.msg_controllen = ip6optlen;