From 29f13f22feccaabedfe7cea8702236b6c6e77b4e Mon Sep 17 00:00:00 2001 From: David Garcia Quintas <dgq@google.com> Date: Fri, 17 Jul 2015 11:54:07 -0700 Subject: [PATCH] Moar parenthesis! --- include/grpc/support/useful.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/grpc/support/useful.h b/include/grpc/support/useful.h index 725e892c75..3842611590 100644 --- a/include/grpc/support/useful.h +++ b/include/grpc/support/useful.h @@ -53,13 +53,13 @@ } while (0) /** Set the \a n-th bit of \a i (a mutable pointer). */ -#define GPR_BITSET(i, n) ((*(i)) |= (1u << n)) +#define GPR_BITSET(i, n) ((*(i)) |= (1u << (n))) /** Clear the \a n-th bit of \a i (a mutable pointer). */ -#define GPR_BITCLEAR(i, n) ((*(i)) &= ~(1u << n)) +#define GPR_BITCLEAR(i, n) ((*(i)) &= ~(1u << (n))) /** Get the \a n-th bit of \a i */ -#define GPR_BITGET(i, n) (((i) & (1u << n)) != 0) +#define GPR_BITGET(i, n) (((i) & (1u << (n))) != 0) #define GPR_INTERNAL_HEXDIGIT_BITCOUNT(x) \ ((x) - (((x) >> 1) & 0x77777777) - (((x) >> 2) & 0x33333333) - \ @@ -69,7 +69,7 @@ #define GPR_BITCOUNT(i) \ (((GPR_INTERNAL_HEXDIGIT_BITCOUNT(i) + \ (GPR_INTERNAL_HEXDIGIT_BITCOUNT(i) >> 4)) & \ - 0x0F0F0F0F) % \ + 0x0f0f0f0f) % \ 255) #endif /* GRPC_SUPPORT_USEFUL_H */ -- GitLab