diff options
author | Luca Deri <deri@ntop.org> | 2020-07-25 18:59:48 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-07-25 18:59:48 +0200 |
commit | 95263fc32e75c198b21ceedfd15522d4aa5a761d (patch) | |
tree | eeee3d76da947a9c83d2ac922478412aa78b107f /src | |
parent | 1c405e382ac1e39aad661bb7e095865e98c036a8 (diff) |
Added parentheses to avoid issues with macro expansion
Diffstat (limited to 'src')
-rw-r--r-- | src/include/ndpi_define.h.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/ndpi_define.h.in b/src/include/ndpi_define.h.in index 5add2e1c8..edac6f53b 100644 --- a/src/include/ndpi_define.h.in +++ b/src/include/ndpi_define.h.in @@ -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*, |