compare pointers with NULL not '\0'.
This commit is contained in:
parent
2089a3819a
commit
684b182f81
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lex.c,v 1.33 2019/01/05 16:54:00 christos Exp $ */
|
||||
/* $NetBSD: lex.c,v 1.34 2019/02/01 08:29:03 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1991, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)lex.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: lex.c,v 1.33 2019/01/05 16:54:00 christos Exp $");
|
||||
__RCSID("$NetBSD: lex.c,v 1.34 2019/02/01 08:29:03 mrg Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -1323,7 +1323,7 @@ top:
|
|||
}
|
||||
}
|
||||
if (alvec) {
|
||||
if ((alvecp = *alvec) != '\0') {
|
||||
if ((alvecp = *alvec) != NULL) {
|
||||
alvec++;
|
||||
goto top;
|
||||
}
|
||||
|
@ -1346,7 +1346,7 @@ top:
|
|||
doneinp = 1;
|
||||
reset();
|
||||
}
|
||||
if ((evalp = *evalvec) != '\0') {
|
||||
if ((evalp = *evalvec) != NULL) {
|
||||
evalvec++;
|
||||
goto top;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: options.c,v 1.4 2014/10/25 21:11:37 christos Exp $ */
|
||||
/* $NetBSD: options.c,v 1.5 2019/02/01 08:29:04 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* options.c - handles option processing for PPP.
|
||||
|
@ -47,7 +47,7 @@
|
|||
#define RCSID "Id: options.c,v 1.102 2008/06/15 06:53:06 paulus Exp "
|
||||
static const char rcsid[] = RCSID;
|
||||
#else
|
||||
__RCSID("$NetBSD: options.c,v 1.4 2014/10/25 21:11:37 christos Exp $");
|
||||
__RCSID("$NetBSD: options.c,v 1.5 2019/02/01 08:29:04 mrg Exp $");
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
@ -1787,7 +1787,7 @@ user_unsetenv(argv)
|
|||
option_error("unexpected = in name: %s", arg);
|
||||
return 0;
|
||||
}
|
||||
if (arg == '\0') {
|
||||
if (arg == NULL) {
|
||||
option_error("missing variable name for unset");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fwcontrol.c,v 1.16 2011/10/17 16:50:47 mbalmer Exp $ */
|
||||
/* $NetBSD: fwcontrol.c,v 1.17 2019/02/01 08:29:04 mrg Exp $ */
|
||||
/*
|
||||
* Copyright (C) 2002
|
||||
* Hidetoshi Shimokawa. All rights reserved.
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
#include <sys/cdefs.h>
|
||||
//__FBSDID("$FreeBSD: src/usr.sbin/fwcontrol/fwcontrol.c,v 1.23 2006/10/26 22:33:38 imp Exp $");
|
||||
__RCSID("$NetBSD: fwcontrol.c,v 1.16 2011/10/17 16:50:47 mbalmer Exp $");
|
||||
__RCSID("$NetBSD: fwcontrol.c,v 1.17 2019/02/01 08:29:04 mrg Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/malloc.h>
|
||||
|
@ -117,7 +117,7 @@ str2node(int fd, const char *nodestr)
|
|||
int i;
|
||||
long node;
|
||||
|
||||
if (nodestr == '\0')
|
||||
if (nodestr == NULL)
|
||||
return -1;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue