diff options
| author | mrg <mrg@NetBSD.org> | 2019-02-01 08:29:03 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2019-02-01 08:29:03 +0000 |
| commit | fd79d825ee062e2e999990830ad404040b98c5ec (patch) | |
| tree | 69be9558a68fbd0d1a3a5f077fc5fd2eb595b940 /usr.bin | |
| parent | 192803ab2680a3fa181fc1cd39f5031ae9be1fdb (diff) | |
compare pointers with NULL not '\0'.
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/basename/basename.c | 6 | ||||
| -rw-r--r-- | usr.bin/gcore/gcore.c | 6 | ||||
| -rw-r--r-- | usr.bin/mail/mime_attach.c | 6 | ||||
| -rw-r--r-- | usr.bin/tabs/tabs.c | 6 | ||||
| -rw-r--r-- | usr.bin/tip/acu.c | 6 |
5 files changed, 15 insertions, 15 deletions
diff --git a/usr.bin/basename/basename.c b/usr.bin/basename/basename.c index 5bd8f9f1579..78b5d8bb1bc 100644 --- a/usr.bin/basename/basename.c +++ b/usr.bin/basename/basename.c @@ -1,4 +1,4 @@ -/* $NetBSD: basename.c,v 1.15 2011/08/29 14:24:03 joerg Exp $ */ +/* $NetBSD: basename.c,v 1.16 2019/02/01 08:29:04 mrg Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993, 1994\ #if 0 static char sccsid[] = "@(#)basename.c 8.4 (Berkeley) 5/4/95"; #endif -__RCSID("$NetBSD: basename.c,v 1.15 2011/08/29 14:24:03 joerg Exp $"); +__RCSID("$NetBSD: basename.c,v 1.16 2019/02/01 08:29:04 mrg Exp $"); #endif /* not lint */ #include <err.h> @@ -78,7 +78,7 @@ main(int argc, char **argv) } if ((p = basename(*argv)) == NULL) err(1, "%s", *argv); - if (*++argv != '\0') { + if (*++argv != NULL) { int suffixlen, stringlen, off; suffixlen = strlen(*argv); diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c index 276ef94b933..f8e6c06871a 100644 --- a/usr.bin/gcore/gcore.c +++ b/usr.bin/gcore/gcore.c @@ -1,4 +1,4 @@ -/* $NetBSD: gcore.c,v 1.11 2008/04/28 20:24:13 martin Exp $ */ +/* $NetBSD: gcore.c,v 1.12 2019/02/01 08:29:04 mrg Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: gcore.c,v 1.11 2008/04/28 20:24:13 martin Exp $"); +__RCSID("$NetBSD: gcore.c,v 1.12 2019/02/01 08:29:04 mrg Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -88,7 +88,7 @@ main(int argc, char **argv) errno = 0; lval = strtoul(argv[c], &ep, 0); - if (argv[c] == '\0' || *ep) + if (argv[c] == NULL || *ep) errx(1, "`%s' is not a number.", argv[c]); if (errno == ERANGE && lval == ULONG_MAX) diff --git a/usr.bin/mail/mime_attach.c b/usr.bin/mail/mime_attach.c index a79876a4403..5d369ef1743 100644 --- a/usr.bin/mail/mime_attach.c +++ b/usr.bin/mail/mime_attach.c @@ -1,4 +1,4 @@ -/* $NetBSD: mime_attach.c,v 1.19 2017/11/09 20:27:50 christos Exp $ */ +/* $NetBSD: mime_attach.c,v 1.20 2019/02/01 08:29:04 mrg Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include <sys/cdefs.h> #ifndef __lint__ -__RCSID("$NetBSD: mime_attach.c,v 1.19 2017/11/09 20:27:50 christos Exp $"); +__RCSID("$NetBSD: mime_attach.c,v 1.20 2019/02/01 08:29:04 mrg Exp $"); #endif /* not __lint__ */ #include <assert.h> @@ -1018,7 +1018,7 @@ mime_attach_optargs(struct name *optargs) argc = getrawlist(np->n_name, argv, (int)__arraycount(argv)); else { - if (np->n_name == '\0') + if (np->n_name == NULL) argc = 0; else { argc = 1; diff --git a/usr.bin/tabs/tabs.c b/usr.bin/tabs/tabs.c index 33238ae9d89..9e017a04f8c 100644 --- a/usr.bin/tabs/tabs.c +++ b/usr.bin/tabs/tabs.c @@ -1,4 +1,4 @@ -/* $NetBSD: tabs.c,v 1.4 2011/09/16 15:39:29 joerg Exp $ */ +/* $NetBSD: tabs.c,v 1.5 2019/02/01 08:29:04 mrg Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 2008 \ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: tabs.c,v 1.4 2011/09/16 15:39:29 joerg Exp $"); +__RCSID("$NetBSD: tabs.c,v 1.5 2019/02/01 08:29:04 mrg Exp $"); #endif /* not lint */ #include <sys/ioctl.h> @@ -112,7 +112,7 @@ main(int argc, char **argv) if (arg[0] == '\0') usage(); if (arg[0] == '-' && arg[1] == '\0') { - if (argv[i + 1] != '\0') + if (argv[i + 1] != NULL) tabs = argv[i + 1]; break; } diff --git a/usr.bin/tip/acu.c b/usr.bin/tip/acu.c index ee91f3dfca4..974bc0d34d8 100644 --- a/usr.bin/tip/acu.c +++ b/usr.bin/tip/acu.c @@ -1,4 +1,4 @@ -/* $NetBSD: acu.c,v 1.16 2011/09/06 18:33:01 joerg Exp $ */ +/* $NetBSD: acu.c,v 1.17 2019/02/01 08:29:04 mrg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)acu.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: acu.c,v 1.16 2011/09/06 18:33:01 joerg Exp $"); +__RCSID("$NetBSD: acu.c,v 1.17 2019/02/01 08:29:04 mrg Exp $"); #endif /* not lint */ #include "tip.h" @@ -183,7 +183,7 @@ acutype(char *s) { acu_t *p; - for (p = acutable; p->acu_name != '\0'; p++) + for (p = acutable; p->acu_name != NULL; p++) if (!strcmp(s, p->acu_name)) return (p); return (NULL); |
