From 5b3421712df32357bb45a1f53110c0f849b0d314 Mon Sep 17 00:00:00 2001 From: pfg Date: Fri, 15 Apr 2016 16:10:11 +0000 Subject: kern: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. --- sys/libkern/strtol.c | 2 +- sys/libkern/strtoq.c | 2 +- sys/libkern/strtoul.c | 2 +- sys/libkern/strtouq.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/libkern') 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); } -- cgit v1.1