From a738ba1aed0719ca61a77ee28786186743e270f5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 26 Jul 2018 12:06:10 +1000 Subject: [PATCH] util: fix a ubsan complaint about undefined left-shift Signed-off-by: Peter Hutterer --- src/libinput-util.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libinput-util.h b/src/libinput-util.h index 85166ca5..944e1861 100644 --- a/src/libinput-util.h +++ b/src/libinput-util.h @@ -207,19 +207,19 @@ msleep(unsigned int ms) static inline bool long_bit_is_set(const unsigned long *array, int bit) { - return !!(array[bit / LONG_BITS] & (1LL << (bit % LONG_BITS))); + return !!(array[bit / LONG_BITS] & (1ULL << (bit % LONG_BITS))); } static inline void long_set_bit(unsigned long *array, int bit) { - array[bit / LONG_BITS] |= (1LL << (bit % LONG_BITS)); + array[bit / LONG_BITS] |= (1ULL << (bit % LONG_BITS)); } static inline void long_clear_bit(unsigned long *array, int bit) { - array[bit / LONG_BITS] &= ~(1LL << (bit % LONG_BITS)); + array[bit / LONG_BITS] &= ~(1ULL << (bit % LONG_BITS)); } static inline void