mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
lib:util: Fix undefined behavior in idtree
lib/util/idtree.c:84 runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
parent
02913d0888
commit
470a9b891a
@ -50,9 +50,9 @@
|
||||
#define MAX_LEVEL (MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS
|
||||
#define IDR_FREE_MAX MAX_LEVEL + MAX_LEVEL
|
||||
|
||||
#define set_bit(bit, v) (v) |= (1<<(bit))
|
||||
#define clear_bit(bit, v) (v) &= ~(1<<(bit))
|
||||
#define test_bit(bit, v) ((v) & (1<<(bit)))
|
||||
#define set_bit(bit, v) (v) |= (1U<<(bit))
|
||||
#define clear_bit(bit, v) (v) &= ~(1U<<(bit))
|
||||
#define test_bit(bit, v) ((v) & (1U<<(bit)))
|
||||
|
||||
struct idr_layer {
|
||||
uint32_t bitmap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user