From d26bbf3c49e1d4bcb3e87f83735dbdb48ed9ea68 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 3 Aug 2011 12:19:27 -0400 Subject: util.h: Properly parenthesize IS_POWER_OF_TWO(). --- libmaple/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmaple/util.h') 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 -- cgit v1.2.3