libkern: don't use MPASS

Using MPASS in libkern breaks buildworld.  Replace MPASS with KASSERT
in three places.
This commit is contained in:
Doug Moore 2024-06-03 13:20:00 -05:00
parent 5dda778db6
commit 08f6f78f81

View file

@ -190,7 +190,7 @@ static __inline __pure2 int
ilog2_int(int n)
{
MPASS(n != 0);
KASSERT(n != 0, ("ilog argument must be nonzero"));
return (8 * sizeof(n) - 1 - __builtin_clz((u_int)n));
}
@ -198,7 +198,7 @@ static __inline __pure2 int
ilog2_long(long n)
{
MPASS(n != 0);
KASSERT(n != 0, ("ilog argument must be nonzero"));
return (8 * sizeof(n) - 1 - __builtin_clzl((u_long)n));
}
@ -206,7 +206,7 @@ static __inline __pure2 int
ilog2_long_long(long long n)
{
MPASS(n != 0);
KASSERT(n != 0, ("ilog argument must be nonzero"));
return (8 * sizeof(n) - 1 -
__builtin_clzll((unsigned long long)n));
}