summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2023-06-30 08:48:38 +0000
committerrillig <rillig@NetBSD.org>2023-06-30 08:48:38 +0000
commit0f454ba3a90d6184e105fe4d695622b197f2a4a5 (patch)
treeed0a83f8283960295ac070508a6ab06d25d4c1f7 /usr.bin
parent4648fa324118d00e3e517238e35bad12241b3e53 (diff)
lint: use NULL for null pointer constants
No binary change.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/xlint/lint1/tree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c
index 9fc049c38e3..68883a855ab 100644
--- a/usr.bin/xlint/lint1/tree.c
+++ b/usr.bin/xlint/lint1/tree.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.533 2023/06/30 08:45:22 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.534 2023/06/30 08:48:38 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.533 2023/06/30 08:45:22 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.534 2023/06/30 08:48:38 rillig Exp $");
#endif
#include <float.h>
@@ -4102,14 +4102,14 @@ build_alignof(const type_t *tp)
case FUNC:
/* cannot take size/alignment of function type '%s' */
error(144, type_name(tp));
- return 0;
+ return NULL;
case STRUCT:
case UNION:
if (is_incomplete(tp)) {
/* cannot take size/alignment of incomplete type */
error(143);
- return 0;
+ return NULL;
}
break;
case ENUM:
@@ -4118,12 +4118,12 @@ build_alignof(const type_t *tp)
if (tp->t_bitfield) {
/* cannot take size/alignment of bit-field */
error(145);
- return 0;
+ return NULL;
}
if (tp->t_tspec == VOID) {
/* cannot take size/alignment of void */
error(146);
- return 0;
+ return NULL;
}
break;
}