Fix undefined behaviour in internal tests
Error messages:
ndpiReader.c:3211:2: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
ndpiReader.c:3207:5: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
The errors started popping up since 3d9285f1
This commit is contained in:
@@ -277,7 +277,7 @@
|
|||||||
#define NDPI_SET_BIT(num, n) num |= 1UL << n
|
#define NDPI_SET_BIT(num, n) num |= 1UL << n
|
||||||
#define NDPI_CLR_BIT(num, n) num &= ~(1UL << n)
|
#define NDPI_CLR_BIT(num, n) num &= ~(1UL << n)
|
||||||
#define NDPI_CLR_BIT(num, n) num &= ~(1UL << n)
|
#define NDPI_CLR_BIT(num, n) num &= ~(1UL << n)
|
||||||
#define NDPI_ISSET_BIT(num, n) (num & (1 << n))
|
#define NDPI_ISSET_BIT(num, n) (num & (1UL << n))
|
||||||
#define NDPI_ZERO_BIT(num) num = 0
|
#define NDPI_ZERO_BIT(num) num = 0
|
||||||
|
|
||||||
/* this is a very very tricky macro *g*,
|
/* this is a very very tricky macro *g*,
|
||||||
|
|||||||
Reference in New Issue
Block a user