Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: improve error message for parsing ...



details:   https://anonhg.NetBSD.org/src/rev/0436faf2a349
branches:  trunk
changeset: 372972:0436faf2a349
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jan 08 17:54:03 2023 +0000

description:
lint: improve error message for parsing query IDs

diffstat:

 usr.bin/xlint/lint1/err.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d3eaa1bc0c2f -r 0436faf2a349 usr.bin/xlint/lint1/err.c
--- a/usr.bin/xlint/lint1/err.c Sun Jan 08 17:03:42 2023 +0000
+++ b/usr.bin/xlint/lint1/err.c Sun Jan 08 17:54:03 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: err.c,v 1.184 2022/10/01 09:42:40 rillig Exp $ */
+/*     $NetBSD: err.c,v 1.185 2023/01/08 17:54:03 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: err.c,v 1.184 2022/10/01 09:42:40 rillig Exp $");
+__RCSID("$NetBSD: err.c,v 1.185 2023/01/08 17:54:03 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -750,7 +750,7 @@
                if (!(ch_isdigit(s[0]) && end == e &&
                      id < sizeof(queries) / sizeof(queries[0]) &&
                      queries[id][0] != '\0'))
-                       errx(1, "invalid query ID '%s'", s);
+                       errx(1, "invalid query ID '%.*s'", (int)(e - s), s);
 
                any_query_enabled = true;
                is_query_enabled[id] = true;



Home | Main Index | Thread Index | Old Index