diff options
author | araujo <araujo@FreeBSD.org> | 2016-04-19 01:57:56 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2016-04-19 01:57:56 +0000 |
commit | eeb0fb82dcf0adb95bd4dd940b6f0f6f49b47534 (patch) | |
tree | f9c5640a55a67a50f82eedd484f1fd2571438563 /sbin/ping6 | |
parent | 01ad9aa4bf25709f5ef398b5e9d665f373d42ea7 (diff) | |
download | FreeBSD-src-eeb0fb82dcf0adb95bd4dd940b6f0f6f49b47534.zip FreeBSD-src-eeb0fb82dcf0adb95bd4dd940b6f0f6f49b47534.tar.gz |
Use NULL instead of 0 for pointers.
malloc will return NULL if it cannot allocate memory.
MFC after: 2 weeks.
Diffstat (limited to 'sbin/ping6')
-rw-r--r-- | sbin/ping6/ping6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c index 03381e0..7e1719a 100644 --- a/sbin/ping6/ping6.c +++ b/sbin/ping6/ping6.c @@ -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; |