Date: Mon, 10 Feb 2025 14:16:44 GMT From: Doug Moore <dougm@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 2ee9d7dcdbe1 - stable/14 - libkern: don't use MPASS Message-ID: <202502101416.51AEGiFO053156@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502101416.51AEGiFO053156>