Date: Mon, 3 Jun 2024 18:22:34 GMT From: Doug Moore <dougm@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 08f6f78f81e2 - main - libkern: don't use MPASS Message-ID: <202406031822.453IMYdg065208@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=08f6f78f81e21b21dd002a9389436b0333cb3488 commit 08f6f78f81e21b21dd002a9389436b0333cb3488 Author: Doug Moore <dougm@FreeBSD.org> AuthorDate: 2024-06-03 18:20:00 +0000 Commit: Doug Moore <dougm@FreeBSD.org> CommitDate: 2024-06-03 18:22:22 +0000 libkern: don't use MPASS Using MPASS in libkern breaks buildworld. Replace MPASS with KASSERT in three places. --- 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 84d982c43a76..afdfe7346b28 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -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)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406031822.453IMYdg065208>