diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-08-03 12:19:27 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-08-03 17:34:03 -0400 |
commit | d26bbf3c49e1d4bcb3e87f83735dbdb48ed9ea68 (patch) | |
tree | 60cc78a7ecc7a47a4e00d2728cc1274084c0a428 | |
parent | 8d02e8e9fd7341dc54684b45125b0cfc8e5a98f3 (diff) | |
download | librambutan-d26bbf3c49e1d4bcb3e87f83735dbdb48ed9ea68.tar.gz librambutan-d26bbf3c49e1d4bcb3e87f83735dbdb48ed9ea68.zip |
util.h: Properly parenthesize IS_POWER_OF_TWO().
-rw-r--r-- | libmaple/util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmaple/util.h b/libmaple/util.h index 1e47d45..7ae8e02 100644 --- a/libmaple/util.h +++ b/libmaple/util.h @@ -46,7 +46,7 @@ extern "C"{ #define BIT_MASK_SHIFT(mask, shift) ((mask) << (shift)) /** Bits m to n of x */ #define GET_BITS(x, m, n) ((((uint32)x) << (31 - (n))) >> ((31 - (n)) + (m))) -#define IS_POWER_OF_TWO(v) (v && !(v & (v - 1))) +#define IS_POWER_OF_TWO(v) ((v) && !((v) & ((v) - 1))) /* * Failure routines |