diff options
author | eivind <eivind@FreeBSD.org> | 1999-01-08 17:31:30 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1999-01-08 17:31:30 +0000 |
commit | a8dc66f457be84eefbe16e70c901ceb11137ba65 (patch) | |
tree | e5747f527c552fa90334c779c047697b372582fb /sys/kern/subr_autoconf.c | |
parent | 1c69824749ed0aa6efce159d39ab3f17fc9e25f2 (diff) | |
download | FreeBSD-src-a8dc66f457be84eefbe16e70c901ceb11137ba65.zip FreeBSD-src-a8dc66f457be84eefbe16e70c901ceb11137ba65.tar.gz |
Split DIAGNOSTIC -> DIAGNOSTIC, INVARIANTS, and INVARIANT_SUPPORT as
discussed on -hackers.
Introduce 'KASSERT(assertion, ("panic message", args))' for simple
check + panic.
Reviewed by: msmith
Diffstat (limited to 'sys/kern/subr_autoconf.c')
-rw-r--r-- | sys/kern/subr_autoconf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index 8dfba39..9234732 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -41,7 +41,7 @@ * * @(#)subr_autoconf.c 8.1 (Berkeley) 6/10/93 * - * $Id: subr_autoconf.c,v 1.6 1997/11/18 12:43:41 bde Exp $ + * $Id: subr_autoconf.c,v 1.7 1998/12/04 22:54:51 archie Exp $ */ #include <sys/param.h> @@ -334,10 +334,8 @@ evcnt_attach(dev, name, ev) { static struct evcnt **nextp = &allevents; -#ifdef DIAGNOSTIC - if (strlen(name) >= sizeof(ev->ev_name)) - panic("evcnt_attach"); -#endif + KASSERT(strlen(name) < sizeof(ev->ev_name), ("evcnt_attach")); + /* ev->ev_next = NULL; */ ev->ev_dev = dev; /* ev->ev_count = 0; */ |