Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105528666
D22898.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
950 B
Referenced Files
None
Subscribers
None
D22898.diff
View Options
Index: head/sys/sys/_sigset.h
===================================================================
--- head/sys/sys/_sigset.h
+++ head/sys/sys/_sigset.h
@@ -47,7 +47,7 @@
#define _SIG_MAXSIG 128
#define _SIG_IDX(sig) ((sig) - 1)
#define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5)
-#define _SIG_BIT(sig) (1 << (_SIG_IDX(sig) & 31))
+#define _SIG_BIT(sig) (1U << (_SIG_IDX(sig) & 31))
#define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0)
typedef struct __sigset {
Index: head/sys/sys/bitset.h
===================================================================
--- head/sys/sys/bitset.h
+++ head/sys/sys/bitset.h
@@ -41,7 +41,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) \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 7:49 AM (20 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15481060
Default Alt Text
D22898.diff (950 B)
Attached To
Mode
D22898: Fix undefined behavior: left-shifting into the sign bit.
Attached
Detach File
Event Timeline
Log In to Comment