From: Rafael Garcia-Suarez Date: Sun, 1 Feb 2009 21:52:13 +0000 (+0100) Subject: Put parentheses around macro arguments X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=22901f3092e7c5e351ab76b58f47dc595d022343;p=p5sagit%2Fp5-mst-13.2.git Put parentheses around macro arguments --- diff --git a/utf8.h b/utf8.h index 0b3dc6a..659319e 100644 --- a/utf8.h +++ b/utf8.h @@ -118,8 +118,8 @@ encoded character. #define UTF8_IS_CONTINUED(c) (((U8)c) & 0x80) #define UTF8_IS_DOWNGRADEABLE_START(c) (((U8)c & 0xfc) == 0xc0) -#define UTF_START_MARK(len) ((len > 7) ? 0xFF : (0xFE << (7-len))) -#define UTF_START_MASK(len) ((len >= 7) ? 0x00 : (0x1F >> (len-2))) +#define UTF_START_MARK(len) (((len) > 7) ? 0xFF : (0xFE << (7-(len)))) +#define UTF_START_MASK(len) (((len) >= 7) ? 0x00 : (0x1F >> ((len)-2))) #define UTF_CONTINUATION_MARK 0x80 #define UTF_ACCUMULATION_SHIFT 6 diff --git a/utfebcdic.h b/utfebcdic.h index 67b993f..e61b4a7 100644 --- a/utfebcdic.h +++ b/utfebcdic.h @@ -472,8 +472,8 @@ END_EXTERN_C #define UTF8_IS_CONTINUED(c) (NATIVE_TO_UTF(c) >= 0xA0) #define UTF8_IS_DOWNGRADEABLE_START(c) (NATIVE_TO_UTF(c) >= 0xA0 && (NATIVE_TO_UTF(c) & 0xF8) == 0xC0) -#define UTF_START_MARK(len) ((len > 7) ? 0xFF : ((U8)(0xFE << (7-len)))) -#define UTF_START_MASK(len) ((len >= 6) ? 0x01 : (0x1F >> (len-2))) +#define UTF_START_MARK(len) (((len) > 7) ? 0xFF : ((U8)(0xFE << (7-(len))))) +#define UTF_START_MASK(len) (((len) >= 6) ? 0x01 : (0x1F >> ((len)-2))) #define UTF_CONTINUATION_MARK 0xA0 #define UTF_CONTINUATION_MASK ((U8)0x1f) #define UTF_ACCUMULATION_SHIFT 5