summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2020-09-03 04:19:54 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2020-09-03 04:19:54 +0000
commit55e492d4547f22b2e0081d07091a376aeaad9ee3 (patch)
tree1ec584c94b6156bdaeb36f1e9d71b59b49a096ce /usr.bin
parent72af4ee735ee66638dcdcd80779cd22ff7d13962 (diff)
Switch use of '\0' to NULL
Fix a clang 10 warning about comparing a pointer to a null character. The condition "if ((s = symnam[i]) == '\0')" used to be "if (s = symnam[i])" and the incorrect spelling of NULL was chosen in a -Wall cleanup 19 years ago (-r 1.6). Upstream uses a naked 0 instead of NULL, so does NetBSD. ok martijn millert
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/yacc/output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/yacc/output.c b/usr.bin/yacc/output.c
index 904db5fcdaa..14bf989a9f7 100644
--- a/usr.bin/yacc/output.c
+++ b/usr.bin/yacc/output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: output.c,v 1.27 2020/05/23 21:08:38 espie Exp $ */
+/* $OpenBSD: output.c,v 1.28 2020/09/03 04:19:53 tb Exp $ */
/* $NetBSD: output.c,v 1.4 1996/03/19 03:21:41 jtc Exp $ */
/*
@@ -905,7 +905,7 @@ output_debug(void)
"\t{", symbol_prefix);
j = 80;
for (i = 0; i <= max; ++i) {
- if ((s = symnam[i]) != '\0') {
+ if ((s = symnam[i]) != NULL) {
if (s[0] == '"') {
k = 7;
while (*++s != '"') {