diff options
| author | rillig <rillig@NetBSD.org> | 2022-07-02 11:17:54 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2022-07-02 11:17:54 +0000 |
| commit | dd0d28e13530e12ea78edcf3f8be5ea6e40018b7 (patch) | |
| tree | 671343501c96dda220b02a21e4d82fb73f2cbf93 /usr.bin | |
| parent | 48bb9f028628db6e5fa64b95aa1053a73e626448 (diff) | |
lint: allow message IDs to be only specified in decimal
The message IDs are communicated in decimal everywhere, there's no point
in passing '-X 0x00000084' instead of the clearer '-X 132'.
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/xlint/lint1/err.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/xlint/lint1/err.c b/usr.bin/xlint/lint1/err.c index a1f2a595c0d..d9fb0052167 100644 --- a/usr.bin/xlint/lint1/err.c +++ b/usr.bin/xlint/lint1/err.c @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.179 2022/07/01 21:48:05 rillig Exp $ */ +/* $NetBSD: err.c,v 1.180 2022/07/02 11:17:54 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,10 +37,9 @@ #include <sys/cdefs.h> #if defined(__RCSID) -__RCSID("$NetBSD: err.c,v 1.179 2022/07/01 21:48:05 rillig Exp $"); +__RCSID("$NetBSD: err.c,v 1.180 2022/07/02 11:17:54 rillig Exp $"); #endif -#include <errno.h> #include <limits.h> #include <stdarg.h> #include <stdlib.h> @@ -423,8 +422,7 @@ suppress_messages(char *ids) unsigned long id; for (ptr = strtok(ids, ","); ptr != NULL; ptr = strtok(NULL, ",")) { - errno = 0; - id = strtoul(ptr, &end, 0); + id = strtoul(ptr, &end, 10); if (*end != '\0' || ptr == end || id >= sizeof(msgs) / sizeof(msgs[0])) errx(1, "invalid error message id '%s'", ptr); |
