Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/config PR/56453: Wataru Ashihara: config(1): Asserti...
details: https://anonhg.NetBSD.org/src/rev/2544a0c78a33
branches: trunk
changeset: 989132:2544a0c78a33
user: christos <christos%NetBSD.org@localhost>
date: Tue Oct 12 17:14:10 2021 +0000
description:
PR/56453: Wataru Ashihara: config(1): Assertion fails in config -L
Only compare pointers when one is found.
diffstat:
usr.bin/config/lint.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (33 lines):
diff -r 784627497902 -r 2544a0c78a33 usr.bin/config/lint.c
--- a/usr.bin/config/lint.c Tue Oct 12 17:06:26 2021 +0000
+++ b/usr.bin/config/lint.c Tue Oct 12 17:14:10 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lint.c,v 1.15 2014/10/29 17:14:50 christos Exp $ */
+/* $NetBSD: lint.c,v 1.16 2021/10/12 17:14:10 christos Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation.
@@ -31,7 +31,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: lint.c,v 1.15 2014/10/29 17:14:50 christos Exp $");
+__RCSID("$NetBSD: lint.c,v 1.16 2021/10/12 17:14:10 christos Exp $");
#include <assert.h>
#include <stdlib.h>
@@ -80,11 +80,11 @@
printf("%s\t%s", ot->ot_name, dl->dl_name);
if (ot->ot_type == OT_PARAM) {
struct defoptlist *dl2 = dlhash_lookup(defoptlint, dl->dl_name);
- if (dl2 != NULL)
+ if (dl2 != NULL) {
+ assert(dl2 == dl);
value = dl2->dl_lintvalue;
- else
+ } else
value = dl->dl_value;
- assert(dl2 == dl);
printf("=\"%s\"", value ? value : "1");
}
printf("\n");
Home |
Main Index |
Thread Index |
Old Index