From efa0b1307d359fc5e1577e767ab964bfc4bbe94a Mon Sep 17 00:00:00 2001 From: hselasky Date: Thu, 12 Sep 2019 15:57:49 +0000 Subject: [PATCH] Fix for undefined behaviour. Left shift of 1 by 31 places cannot be represented in type 'int'. MFC after: 1 week Sponsored by: Mellanox Technologies --- sys/sys/refcount.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/refcount.h b/sys/sys/refcount.h index 0ba13754cb0..f680bd6d565 100644 --- a/sys/sys/refcount.h +++ b/sys/sys/refcount.h @@ -39,7 +39,7 @@ #define KASSERT(exp, msg) /* */ #endif -#define REFCOUNT_WAITER (1 << 31) /* Refcount has waiter. */ +#define REFCOUNT_WAITER (1U << 31) /* Refcount has waiter. */ #define REFCOUNT_SATURATION_VALUE (3U << 29) #define REFCOUNT_SATURATED(val) (((val) & (1U << 30)) != 0) -- 2.39.5