[master] 2a84af91d Upset Flexelint less

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 23 07:29:05 UTC 2019


commit 2a84af91dd830e75571ea351807b6afaaedbc885
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 23 07:28:36 2019 +0000

    Upset Flexelint less

diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index 31bc6f023..423211e56 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -75,7 +75,7 @@ static vlu_f vsm_vlu_func;
 #define VSM_PRIV_SHIFT							\
 	(sizeof (uintptr_t) * 4)
 #define VSM_PRIV_MASK							\
-	(~((uintptr_t)UINTPTR_MAX << VSM_PRIV_SHIFT))
+	((1UL << VSM_PRIV_SHIFT) - 1)
 #define VSM_PRIV_LOW(u)							\
 	((uintptr_t)(u) & VSM_PRIV_MASK)
 #define VSM_PRIV_HIGH(u)						\


More information about the varnish-commit mailing list