Fix undefined behavior: left-shifting into the sign bit.

Reviewed by:	dim, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D22898
This commit is contained in:
Konstantin Belousov 2019-12-23 20:18:05 +00:00 committed by Sebastian Huber
parent de1380c36b
commit 5e7a2b174a
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@
#define __constexpr_cond(expr) (__builtin_constant_p((expr)) && (expr))
#define __bitset_mask(_s, n) \
(1L << (__constexpr_cond(__bitset_words((_s)) == 1) ? \
(1UL << (__constexpr_cond(__bitset_words((_s)) == 1) ? \
(__size_t)(n) : ((n) % _BITSET_BITS)))
#define __bitset_word(_s, n) \