aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNardi Ivan <nardi.ivan@gmail.com>2020-06-28 12:13:21 +0200
committerNardi Ivan <nardi.ivan@gmail.com>2020-06-28 12:13:21 +0200
commit317d3ffd3ee6a417a804d79248eb98e0eea5a9de (patch)
treed06928a5df89e5a94cfc08c222dbfe4207db706b
parentb24f5c4c0af2df8fd519e79cbcdf699a3b7c38bd (diff)
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
-rw-r--r--src/include/ndpi_define.h.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/ndpi_define.h.in b/src/include/ndpi_define.h.in
index be7c21175..13989a60e 100644
--- a/src/include/ndpi_define.h.in
+++ b/src/include/ndpi_define.h.in
@@ -277,7 +277,7 @@
#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_ISSET_BIT(num, n) (num & (1 << n))
+#define NDPI_ISSET_BIT(num, n) (num & (1UL << n))
#define NDPI_ZERO_BIT(num) num = 0
/* this is a very very tricky macro *g*,