diff options
author | Eric Engestrom <[email protected]> | 2018-10-16 09:43:07 +0100 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2018-10-23 11:44:02 +0100 |
commit | bc021be78d2d5a36376494fca7eaf7f0728c6a29 (patch) | |
tree | 0046a0da72f3df546473ea940f6e3c3674d41e1f /src/util | |
parent | 17b03b532022d4042fb2170b38dc28f5ff22bb8a (diff) |
util: use *unsigned* ints for bit operations
Fixes errors thrown by GCC's Undefined Behaviour sanitizer (ubsan) every
time this macro is used.
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/bitset.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/bitset.h b/src/util/bitset.h index adafc72a5f7..3b18abac793 100644 --- a/src/util/bitset.h +++ b/src/util/bitset.h @@ -54,7 +54,7 @@ #define BITSET_ONES(x) memset( (x), 0xff, sizeof (x) ) #define BITSET_BITWORD(b) ((b) / BITSET_WORDBITS) -#define BITSET_BIT(b) (1 << ((b) % BITSET_WORDBITS)) +#define BITSET_BIT(b) (1u << ((b) % BITSET_WORDBITS)) /* single bit operations */ |