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.
This commit is contained in:
Poul-Henning Kamp 2001-03-20 13:24:24 +00:00
parent 53233f9499
commit 15b6f00fd1
1 changed files with 1 additions and 0 deletions

View File

@ -159,6 +159,7 @@ int
unit2minor(int unit)
{
KASSERT(unit <= 0xffffff, ("Invalid unit (%d) in unit2minor", unit));
return ((unit & 0xff) | ((unit << 8) & ~0xffff));
}