git: 2ee9d7dcdbe1 - stable/14 - libkern: don't use MPASS
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 10 Feb 2025 14:16:44 UTC
The branch stable/14 has been updated by dougm:
URL: https://cgit.FreeBSD.org/src/commit/?id=2ee9d7dcdbe143ad3535723aaeac284c2586a963
commit 2ee9d7dcdbe143ad3535723aaeac284c2586a963
Author: Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2024-06-03 18:20:00 +0000
Commit: Doug Moore <dougm@FreeBSD.org>
CommitDate: 2025-02-10 14:16:25 +0000
libkern: don't use MPASS
Using MPASS in libkern breaks buildworld. Replace MPASS with KASSERT
in three places.
(cherry picked from commit 08f6f78f81e21b21dd002a9389436b0333cb3488)
---
sys/sys/libkern.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h
index 835e5ffaf0b7..a792a61aa8ce 100644
--- a/sys/sys/libkern.h
+++ b/sys/sys/libkern.h
@@ -193,7 +193,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));
}
@@ -201,7 +201,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));
}
@@ -209,7 +209,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));
}