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:
parent
53233f9499
commit
15b6f00fd1
|
@ -159,6 +159,7 @@ int
|
|||
unit2minor(int unit)
|
||||
{
|
||||
|
||||
KASSERT(unit <= 0xffffff, ("Invalid unit (%d) in unit2minor", unit));
|
||||
return ((unit & 0xff) | ((unit << 8) & ~0xffff));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue