mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
libkern: don't use MPASS
Using MPASS in libkern breaks buildworld. Replace MPASS with KASSERT in three places.
This commit is contained in:
parent
5dda778db6
commit
08f6f78f81
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue