diff options
author | araujo <araujo@FreeBSD.org> | 2016-04-18 06:12:00 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2016-04-18 06:12:00 +0000 |
commit | a32949ae45ffcfdbd9a3a1f057f0a684f61592f2 (patch) | |
tree | 1df66ac120fb4a23a51e9ec8051461d203246208 /usr.bin | |
parent | 76c4083741bf8498db4ccc0d6c0f43055a65eefc (diff) | |
download | FreeBSD-src-a32949ae45ffcfdbd9a3a1f057f0a684f61592f2.zip FreeBSD-src-a32949ae45ffcfdbd9a3a1f057f0a684f61592f2.tar.gz |
Use NULL instead of 0 for pointers.
realloc will return NULL if it cannot allocate memory.
MFC after: 2 weeks.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/whereis/whereis.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/whereis/whereis.c b/usr.bin/whereis/whereis.c index ed8d93a..f5d8b0f 100644 --- a/usr.bin/whereis/whereis.c +++ b/usr.bin/whereis/whereis.c @@ -461,7 +461,7 @@ main(int argc, char **argv) nlen = strlen(cp); bin = realloc(bin, olen + nlen + 2); - if (bin == 0) + if (bin == NULL) abort(); strcat(bin, " "); strcat(bin, cp); @@ -535,7 +535,7 @@ main(int argc, char **argv) nlen = strlen(cp2); man = realloc(man, olen + nlen + 2); - if (man == 0) + if (man == NULL) abort(); strcat(man, " "); strcat(man, cp2); @@ -574,7 +574,7 @@ main(int argc, char **argv) nlen = strlen(cp); src = realloc(src, olen + nlen + 2); - if (src == 0) + if (src == NULL) abort(); strcat(src, " "); strcat(src, cp); @@ -643,7 +643,7 @@ main(int argc, char **argv) src = realloc(src, olen + nlen + 2); - if (src == 0) + if (src == NULL) abort(); strcat(src, " "); strcat(src, buf); |