diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-15 16:10:11 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-15 16:10:11 +0000 |
commit | 5b3421712df32357bb45a1f53110c0f849b0d314 (patch) | |
tree | df42f15a407c391f854b5c5ff18ed21d14af3e90 /sys/libkern | |
parent | b72ace02b465aa1a930c057d7d152afb30b4bf95 (diff) | |
download | FreeBSD-src-5b3421712df32357bb45a1f53110c0f849b0d314.zip FreeBSD-src-5b3421712df32357bb45a1f53110c0f849b0d314.tar.gz |
kern: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.
Found with devel/coccinelle.
Diffstat (limited to 'sys/libkern')
-rw-r--r-- | sys/libkern/strtol.c | 2 | ||||
-rw-r--r-- | sys/libkern/strtoq.c | 2 | ||||
-rw-r--r-- | sys/libkern/strtoul.c | 2 | ||||
-rw-r--r-- | sys/libkern/strtouq.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/sys/libkern/strtol.c b/sys/libkern/strtol.c index 4d64025..ea7dd55 100644 --- a/sys/libkern/strtol.c +++ b/sys/libkern/strtol.c @@ -123,7 +123,7 @@ strtol(nptr, endptr, base) acc = neg ? LONG_MIN : LONG_MAX; } else if (neg) acc = -acc; - if (endptr != 0) + if (endptr != NULL) *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } diff --git a/sys/libkern/strtoq.c b/sys/libkern/strtoq.c index d855056..e83adb1 100644 --- a/sys/libkern/strtoq.c +++ b/sys/libkern/strtoq.c @@ -124,7 +124,7 @@ strtoq(const char *nptr, char **endptr, int base) acc = neg ? QUAD_MIN : QUAD_MAX; } else if (neg) acc = -acc; - if (endptr != 0) + if (endptr != NULL) *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } diff --git a/sys/libkern/strtoul.c b/sys/libkern/strtoul.c index f7399dc..44adf5a 100644 --- a/sys/libkern/strtoul.c +++ b/sys/libkern/strtoul.c @@ -102,7 +102,7 @@ strtoul(nptr, endptr, base) acc = ULONG_MAX; } else if (neg) acc = -acc; - if (endptr != 0) + if (endptr != NULL) *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } diff --git a/sys/libkern/strtouq.c b/sys/libkern/strtouq.c index f8303a0..49c3750 100644 --- a/sys/libkern/strtouq.c +++ b/sys/libkern/strtouq.c @@ -101,7 +101,7 @@ strtouq(const char *nptr, char **endptr, int base) acc = UQUAD_MAX; } else if (neg) acc = -acc; - if (endptr != 0) + if (endptr != NULL) *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } |