diff options
author | phk <phk@FreeBSD.org> | 2001-03-20 13:24:24 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2001-03-20 13:24:24 +0000 |
commit | 74b2fb2f6943f9df0d3cb1d6fe049ae701cef3c6 (patch) | |
tree | e5f9b99ac669e7123fbecfe92bdd1b7ad2b191f6 | |
parent | 47ba5e6d34e69c881327719f51228e3fff9a09e2 (diff) | |
download | FreeBSD-src-74b2fb2f6943f9df0d3cb1d6fe049ae701cef3c6.zip FreeBSD-src-74b2fb2f6943f9df0d3cb1d6fe049ae701cef3c6.tar.gz |
Add a KASSERT on unit2minor() so that we catch it if people try to pass
us unit numbers which doesn't fit in 24 bits.
-rw-r--r-- | sys/kern/kern_conf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 86185f7..c40447b 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -159,6 +159,7 @@ int unit2minor(int unit) { + KASSERT(unit <= 0xffffff, ("Invalid unit (%d) in unit2minor", unit)); return ((unit & 0xff) | ((unit << 8) & ~0xffff)); } |