Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Make config_stdsubmatch() human-readable.
details: https://anonhg.NetBSD.org/src/rev/87b7642b48d9
branches: trunk
changeset: 333507:87b7642b48d9
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Thu Nov 06 08:46:04 2014 +0000
description:
Make config_stdsubmatch() human-readable.
diffstat:
sys/kern/subr_autoconf.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (36 lines):
diff -r 79ba4fc64ca0 -r 87b7642b48d9 sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c Thu Nov 06 06:42:25 2014 +0000
+++ b/sys/kern/subr_autoconf.c Thu Nov 06 08:46:04 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.232 2014/09/05 05:57:21 matt Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.233 2014/11/06 08:46:04 uebayasi Exp $ */
/*
* Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.232 2014/09/05 05:57:21 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.233 2014/11/06 08:46:04 uebayasi Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -707,11 +707,12 @@
KASSERT(!nlocs || locs);
for (i = 0; i < nlocs; i++) {
cl = &ci->ci_locdesc[i];
- /* !cld_defaultstr means no default value */
- if ((!(cl->cld_defaultstr)
- || (cf->cf_loc[i] != cl->cld_default))
- && cf->cf_loc[i] != locs[i])
- return 0;
+ if (cl->cld_defaultstr != NULL &&
+ cf->cf_loc[i] == cl->cld_default)
+ continue;
+ if (cf->cf_loc[i] == locs[i])
+ continue;
+ return 0;
}
return config_match(parent, cf, aux);
Home |
Main Index |
Thread Index |
Old Index