summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravsm <avsm@openbsd.org>2003-10-24 20:30:02 +0000
committeravsm <avsm@openbsd.org>2003-10-24 20:30:02 +0000
commitca9f5f35f7c44d7bcfeab03a1aac9e519c331264 (patch)
tree72c90f49bf82436481c29b059ea7212cfec37866
parentIf cons_backlight_available is not set, cons_brightness will not be valid, (diff)
downloadwireguard-openbsd-ca9f5f35f7c44d7bcfeab03a1aac9e519c331264.tar.xz
wireguard-openbsd-ca9f5f35f7c44d7bcfeab03a1aac9e519c331264.zip
dont compare int to NULL, millert@ ok
-rw-r--r--lib/libc/gen/login_cap.c4
-rw-r--r--usr.bin/diff3/diff3prog.c6
-rw-r--r--usr.bin/mail/cmd2.c10
-rw-r--r--usr.bin/mail/collect.c6
-rw-r--r--usr.bin/mail/lex.c8
-rw-r--r--usr.bin/mg/paragraph.c8
-rw-r--r--usr.sbin/inetd/inetd.c6
7 files changed, 24 insertions, 24 deletions
diff --git a/lib/libc/gen/login_cap.c b/lib/libc/gen/login_cap.c
index 31d7ba9f672..bc53fbf90e4 100644
--- a/lib/libc/gen/login_cap.c
+++ b/lib/libc/gen/login_cap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_cap.c,v 1.17 2003/06/25 21:16:47 deraadt Exp $ */
+/* $OpenBSD: login_cap.c,v 1.18 2003/10/24 20:31:00 avsm Exp $ */
/*-
* Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved.
@@ -109,7 +109,7 @@ login_getclass(class)
case -1:
if ((res = open(classfiles[0], 0)) >= 0)
close(res);
- if (strcmp(lc->lc_class, LOGIN_DEFCLASS) == NULL &&
+ if (strcmp(lc->lc_class, LOGIN_DEFCLASS) == 0 &&
res < 0)
return (lc);
syslog(LOG_ERR, "%s: unknown class", lc->lc_class);
diff --git a/usr.bin/diff3/diff3prog.c b/usr.bin/diff3/diff3prog.c
index 2b8a57516aa..c1abdc5d5f9 100644
--- a/usr.bin/diff3/diff3prog.c
+++ b/usr.bin/diff3/diff3prog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff3prog.c,v 1.2 2003/07/14 17:43:52 deraadt Exp $ */
+/* $OpenBSD: diff3prog.c,v 1.3 2003/10/24 20:32:06 avsm Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -71,7 +71,7 @@ static const char copyright[] =
#endif /* not lint */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: diff3prog.c,v 1.2 2003/07/14 17:43:52 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: diff3prog.c,v 1.3 2003/10/24 20:32:06 avsm Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -450,7 +450,7 @@ skip(int i, int from, char *pr)
int j, n;
for (n = 0; cline[i] < from - 1; n += j) {
- if ((j = getline(fp[i])) == NULL)
+ if ((j = getline(fp[i])) == 0)
trouble();
if (pr != NULL)
printf("%s%s", pr, line);
diff --git a/usr.bin/mail/cmd2.c b/usr.bin/mail/cmd2.c
index d55105c48cf..03c03c17a06 100644
--- a/usr.bin/mail/cmd2.c
+++ b/usr.bin/mail/cmd2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd2.c,v 1.12 2003/06/03 02:56:11 millert Exp $ */
+/* $OpenBSD: cmd2.c,v 1.13 2003/10/24 20:32:06 avsm Exp $ */
/* $NetBSD: cmd2.c,v 1.7 1997/05/17 19:55:10 pk Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static const char sccsid[] = "@(#)cmd2.c 8.1 (Berkeley) 6/6/93";
#else
-static const char rcsid[] = "$OpenBSD: cmd2.c,v 1.12 2003/06/03 02:56:11 millert Exp $";
+static const char rcsid[] = "$OpenBSD: cmd2.c,v 1.13 2003/10/24 20:32:06 avsm Exp $";
#endif
#endif /* not lint */
@@ -76,7 +76,7 @@ next(void *v)
for (ip = msgvec; *ip != NULL; ip++)
if (*ip > mdot)
break;
- if (*ip == NULL)
+ if (*ip == 0)
ip = msgvec;
ip2 = ip;
do {
@@ -87,7 +87,7 @@ next(void *v)
}
if (*ip2 != NULL)
ip2++;
- if (*ip2 == NULL)
+ if (*ip2 == 0)
ip2 = msgvec;
} while (ip2 != ip);
puts("No messages applicable");
@@ -162,7 +162,7 @@ save1(char *str, int mark, char *cmd, struct ignoretab *ignore)
return(1);
if (!f) {
*msgvec = first(0, MMNORM);
- if (*msgvec == NULL) {
+ if (*msgvec == 0) {
printf("No messages to %s.\n", cmd);
return(1);
}
diff --git a/usr.bin/mail/collect.c b/usr.bin/mail/collect.c
index 27dec8c8f40..66f83b486b7 100644
--- a/usr.bin/mail/collect.c
+++ b/usr.bin/mail/collect.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: collect.c,v 1.25 2003/06/03 02:56:11 millert Exp $ */
+/* $OpenBSD: collect.c,v 1.26 2003/10/24 20:32:06 avsm Exp $ */
/* $NetBSD: collect.c,v 1.9 1997/07/09 05:25:45 mikel Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static const char sccsid[] = "@(#)collect.c 8.2 (Berkeley) 4/19/94";
#else
-static const char rcsid[] = "$OpenBSD: collect.c,v 1.25 2003/06/03 02:56:11 millert Exp $";
+static const char rcsid[] = "$OpenBSD: collect.c,v 1.26 2003/10/24 20:32:06 avsm Exp $";
#endif
#endif /* not lint */
@@ -527,7 +527,7 @@ forward(char *ms, FILE *fp, char *fn, int f)
return(0);
if (*msgvec == 0) {
*msgvec = first(0, MMNORM);
- if (*msgvec == NULL) {
+ if (*msgvec == 0) {
puts("No appropriate messages");
return(0);
}
diff --git a/usr.bin/mail/lex.c b/usr.bin/mail/lex.c
index c45faa646cc..cbded97fbf4 100644
--- a/usr.bin/mail/lex.c
+++ b/usr.bin/mail/lex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lex.c,v 1.29 2003/10/13 00:46:08 tedu Exp $ */
+/* $OpenBSD: lex.c,v 1.30 2003/10/24 20:32:06 avsm Exp $ */
/* $NetBSD: lex.c,v 1.10 1997/05/17 19:55:13 pk Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static const char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95";
#else
-static const char rcsid[] = "$OpenBSD: lex.c,v 1.29 2003/10/13 00:46:08 tedu Exp $";
+static const char rcsid[] = "$OpenBSD: lex.c,v 1.30 2003/10/24 20:32:06 avsm Exp $";
#endif
#endif /* not lint */
@@ -407,7 +407,7 @@ execute(char *linebuf, int contxt)
com->c_msgmask);
msgvec[1] = NULL;
}
- if (*msgvec == NULL) {
+ if (*msgvec == 0) {
puts("No applicable messages");
break;
}
@@ -437,7 +437,7 @@ execute(char *linebuf, int contxt)
com->c_msgmask);
msgvec[1] = NULL;
}
- if (*msgvec == NULL) {
+ if (*msgvec == 0) {
puts("No applicable messages");
break;
}
diff --git a/usr.bin/mg/paragraph.c b/usr.bin/mg/paragraph.c
index f45b63f7baf..d7499f92749 100644
--- a/usr.bin/mg/paragraph.c
+++ b/usr.bin/mg/paragraph.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: paragraph.c,v 1.8 2003/05/20 03:08:55 cloder Exp $ */
+/* $OpenBSD: paragraph.c,v 1.9 2003/10/24 20:32:06 avsm Exp $ */
/*
* Code for dealing with paragraphs and filling. Adapted from MicroEMACS 3.6
@@ -26,7 +26,7 @@ gotobop(int f, int n)
while (n-- > 0) {
/* first scan back until we are in a word */
- while (backchar(FFRAND, 1) && inword() == NULL);
+ while (backchar(FFRAND, 1) && inword() == 0);
/* and go to the B-O-Line */
curwp->w_doto = 0;
@@ -81,7 +81,7 @@ gotoeop(int f, int n)
while (n-- > 0) {
/* Find the first word on/after the current line */
curwp->w_doto = 0;
- while (forwchar(FFRAND, 1) && inword() == NULL);
+ while (forwchar(FFRAND, 1) && inword() == 0);
curwp->w_doto = 0;
curwp->w_dotp = lforw(curwp->w_dotp);
@@ -140,7 +140,7 @@ fillpara(int f, int n)
(void)gotobop(FFRAND, 1);
/* initialize various info */
- while (inword() == NULL && forwchar(FFRAND, 1));
+ while (inword() == 0 && forwchar(FFRAND, 1));
clength = curwp->w_doto;
wordlen = 0;
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 07a1d8c2f18..2eb8a1a31de 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inetd.c,v 1.112 2003/10/03 22:43:37 deraadt Exp $ */
+/* $OpenBSD: inetd.c,v 1.113 2003/10/24 20:30:02 avsm Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
@@ -37,7 +37,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/
-static char rcsid[] = "$OpenBSD: inetd.c,v 1.112 2003/10/03 22:43:37 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: inetd.c,v 1.113 2003/10/24 20:30:02 avsm Exp $";
#endif /* not lint */
/*
@@ -348,7 +348,7 @@ main(int argc, char *argv[])
int val;
val = strtoul(optarg, &p, 0);
- if (val >= 1 && *p == NULL) {
+ if (val >= 1 && *p == '\0') {
toomany = val;
break;
}