libkern: don't use MPASS
Using MPASS in libkern breaks buildworld. Replace MPASS with KASSERT in three places.
This commit is contained in:
+3
-3
@@ -190,7 +190,7 @@ static __inline __pure2 int
|
|||||||
ilog2_int(int n)
|
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));
|
return (8 * sizeof(n) - 1 - __builtin_clz((u_int)n));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ static __inline __pure2 int
|
|||||||
ilog2_long(long n)
|
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));
|
return (8 * sizeof(n) - 1 - __builtin_clzl((u_long)n));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ static __inline __pure2 int
|
|||||||
ilog2_long_long(long long n)
|
ilog2_long_long(long long n)
|
||||||
{
|
{
|
||||||
|
|
||||||
MPASS(n != 0);
|
KASSERT(n != 0, ("ilog argument must be nonzero"));
|
||||||
return (8 * sizeof(n) - 1 -
|
return (8 * sizeof(n) - 1 -
|
||||||
__builtin_clzll((unsigned long long)n));
|
__builtin_clzll((unsigned long long)n));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user