Added parentheses to avoid issues with macro expansion

This commit is contained in:
Luca Deri
2020-07-25 18:59:48 +02:00
parent 1c405e382a
commit 95263fc32e
+4 -4
View File
@@ -276,10 +276,10 @@
#define NDPI_BITMASK_SET_ALL(a) NDPI_ONE(&a)
#define NDPI_BITMASK_SET(a, b) { memcpy(&a, &b, sizeof(NDPI_PROTOCOL_BITMASK)); }
#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 & (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_ISSET_BIT(num, n) (num & (1UL << ( n )))
#define NDPI_ZERO_BIT(num) num = 0
/* this is a very very tricky macro *g*,