summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mtxpool.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_mtxpool.c')
-rw-r--r--sys/kern/kern_mtxpool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_mtxpool.c b/sys/kern/kern_mtxpool.c
index cc856bc..3267023 100644
--- a/sys/kern/kern_mtxpool.c
+++ b/sys/kern/kern_mtxpool.c
@@ -51,7 +51,10 @@ static __inline
struct mtx *
_mtx_pool_find(void *ptr)
{
- return(&mtx_pool_ary[((int)ptr ^ ((int)ptr >> 6)) & MTX_POOL_MASK]);
+ uintptr_t p;
+
+ p = (uintptr_t)ptr;
+ return(&mtx_pool_ary[(p ^ (p >> 6)) & MTX_POOL_MASK]);
}
static void
OpenPOWER on IntegriCloud