From: Mark Wooding Date: Sun, 15 Jul 2018 18:26:55 +0000 (+0100) Subject: utils/macros.h (N): Properly parenthesize the argument. X-Git-Tag: 2.3.3~9 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/commitdiff_plain/c066b1ff1cfc727cfd8409f79b4d2b990c678196 utils/macros.h (N): Properly parenthesize the argument. WTF? How did I write this wrong? Fortunately, I don't think it actually matters. The argument must have array type. Postfix operators are higher precedence, so that's not a problem; prefix operators are in the right place already; and binary operators don't yield array types. --- diff --git a/utils/macros.h b/utils/macros.h index bcceecd..8f9f49e 100644 --- a/utils/macros.h +++ b/utils/macros.h @@ -40,7 +40,7 @@ /*----- Miscellaneous utility macros --------------------------------------*/ -#define N(v) (sizeof(v)/sizeof(*v)) +#define N(v) (sizeof(v)/sizeof(*(v))) #define MLIB__STR(x) #x #define STR(x) MLIB__STR(x)