Module Name:    src
Committed By:   mrg
Date:           Fri Feb  1 08:29:04 UTC 2019

Modified Files:
        src/bin/csh: lex.c
        src/external/bsd/ppp/dist/pppd: options.c
        src/usr.bin/basename: basename.c
        src/usr.bin/gcore: gcore.c
        src/usr.bin/mail: mime_attach.c
        src/usr.bin/tabs: tabs.c
        src/usr.bin/tip: acu.c
        src/usr.sbin/fwctl: fwcontrol.c

Log Message:
compare pointers with NULL not '\0'.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/bin/csh/lex.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ppp/dist/pppd/options.c
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/basename/basename.c
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/gcore/gcore.c
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/mail/mime_attach.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/tabs/tabs.c
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/tip/acu.c
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/fwctl/fwcontrol.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/csh/lex.c
diff -u src/bin/csh/lex.c:1.33 src/bin/csh/lex.c:1.34
--- src/bin/csh/lex.c:1.33	Sat Jan  5 16:54:00 2019
+++ src/bin/csh/lex.c	Fri Feb  1 08:29:03 2019
@@ -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;
 	}

Index: src/external/bsd/ppp/dist/pppd/options.c
diff -u src/external/bsd/ppp/dist/pppd/options.c:1.4 src/external/bsd/ppp/dist/pppd/options.c:1.5
--- src/external/bsd/ppp/dist/pppd/options.c:1.4	Sat Oct 25 21:11:37 2014
+++ src/external/bsd/ppp/dist/pppd/options.c	Fri Feb  1 08:29:04 2019
@@ -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;
     }

Index: src/usr.bin/basename/basename.c
diff -u src/usr.bin/basename/basename.c:1.15 src/usr.bin/basename/basename.c:1.16
--- src/usr.bin/basename/basename.c:1.15	Mon Aug 29 14:24:03 2011
+++ src/usr.bin/basename/basename.c	Fri Feb  1 08:29:04 2019
@@ -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, 19
 #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);

Index: src/usr.bin/gcore/gcore.c
diff -u src/usr.bin/gcore/gcore.c:1.11 src/usr.bin/gcore/gcore.c:1.12
--- src/usr.bin/gcore/gcore.c:1.11	Mon Apr 28 20:24:13 2008
+++ src/usr.bin/gcore/gcore.c	Fri Feb  1 08:29:04 2019
@@ -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)

Index: src/usr.bin/mail/mime_attach.c
diff -u src/usr.bin/mail/mime_attach.c:1.19 src/usr.bin/mail/mime_attach.c:1.20
--- src/usr.bin/mail/mime_attach.c:1.19	Thu Nov  9 20:27:50 2017
+++ src/usr.bin/mail/mime_attach.c	Fri Feb  1 08:29:04 2019
@@ -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;

Index: src/usr.bin/tabs/tabs.c
diff -u src/usr.bin/tabs/tabs.c:1.4 src/usr.bin/tabs/tabs.c:1.5
--- src/usr.bin/tabs/tabs.c:1.4	Fri Sep 16 15:39:29 2011
+++ src/usr.bin/tabs/tabs.c	Fri Feb  1 08:29:04 2019
@@ -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;
 		}

Index: src/usr.bin/tip/acu.c
diff -u src/usr.bin/tip/acu.c:1.16 src/usr.bin/tip/acu.c:1.17
--- src/usr.bin/tip/acu.c:1.16	Tue Sep  6 18:33:01 2011
+++ src/usr.bin/tip/acu.c	Fri Feb  1 08:29:04 2019
@@ -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);

Index: src/usr.sbin/fwctl/fwcontrol.c
diff -u src/usr.sbin/fwctl/fwcontrol.c:1.16 src/usr.sbin/fwctl/fwcontrol.c:1.17
--- src/usr.sbin/fwctl/fwcontrol.c:1.16	Mon Oct 17 16:50:47 2011
+++ src/usr.sbin/fwctl/fwcontrol.c	Fri Feb  1 08:29:04 2019
@@ -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;
 
 	/*

Reply via email to