diff options
author | Marcelo Araujo <araujo@FreeBSD.org> | 2016-04-18 14:08:35 +0000 |
---|---|---|
committer | Marcelo Araujo <araujo@FreeBSD.org> | 2016-04-18 14:08:35 +0000 |
commit | edf6b683e8158c697e8a00faa986c2d111108d06 (patch) | |
tree | 6449c8de2a401c1e47769930fd6db4dcb154a63b | |
parent | c0e5e7f3d2e1bac7ada43b35843e3a018777854e (diff) |
Use NULL instead of 0 for pointers.
strchr(3) will return NULL if the character does not appear in the
string.
MFC after: 2 weeks.
Notes
Notes:
svn path=/head/; revision=298205
-rw-r--r-- | sbin/growfs/growfs.c | 2 | ||||
-rw-r--r-- | sbin/newfs/newfs.c | 2 | ||||
-rw-r--r-- | sbin/restore/utilities.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 7b85b25329b8..5d13a3c82fc0 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1331,7 +1331,7 @@ getdev(const char *name) return (name); cp = strrchr(name, '/'); - if (cp == 0) { + if (cp == NULL) { snprintf(device, sizeof(device), "%s%s", _PATH_DEV, name); if (is_dev(device)) return (device); diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 1f8e4d358fdf..0dbb786d5bd8 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -306,7 +306,7 @@ main(int argc, char *argv[]) if (!special[0]) err(1, "empty file/special name"); cp = strrchr(special, '/'); - if (cp == 0) { + if (cp == NULL) { /* * No path prefix; try prefixing _PATH_DEV. */ diff --git a/sbin/restore/utilities.c b/sbin/restore/utilities.c index 89c2b09298c9..90bde98ce0d3 100644 --- a/sbin/restore/utilities.c +++ b/sbin/restore/utilities.c @@ -62,7 +62,7 @@ pathcheck(char *name) char *start; start = strchr(name, '/'); - if (start == 0) + if (start == NULL) return; for (cp = start; *cp != '\0'; cp++) { if (*cp != '/') |