From c066b1ff1cfc727cfd8409f79b4d2b990c678196 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sun, 15 Jul 2018 19:26:55 +0100 Subject: [PATCH] utils/macros.h (N): Properly parenthesize the argument. Organization: Straylight/Edgeware From: Mark Wooding 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. --- utils/macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- [mdw]