{"thread":{"id":"55307","subject":"[PATCH] mem-pool: drop trailing semicolon from macro definition","startedAt":"2021-03-13T16:18:30Z","lastAt":"2021-03-13T16:18:30Z","messageCount":1,"participants":["René Scharfe."],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"419043","messageId":"87289f1a-3f64-713b-6c29-210faf87bf98@web.de","threadId":"55307","inReplyTo":null,"subject":"[PATCH] mem-pool: drop trailing semicolon from macro definition","fromName":"René Scharfe.","fromEmail":"l.s.r@web.de","sentAt":"2021-03-13T16:17:37Z","receivedAt":"2021-03-13T16:18:30Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Allow BLOCK_GROWTH_SIZE to be used like an integer literal by removing\nthe trailing semicolon from its definition.  Also wrap the expression in\nparentheses, to allow it to be used with operators without leading to\nunexpected results.  It doesn't matter for the current use site, but\nmake it follow standard macro rules anyway to avoid future surprises.\n\nSigned-off-by: René Scharfe <l.s.r@web.de>\n---\n mem-pool.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/mem-pool.c b/mem-pool.c\nindex 8401761dda..ccdcad2e3d 100644\n--- a/mem-pool.c\n+++ b/mem-pool.c\n@@ -5,7 +5,7 @@\n #include \"cache.h\"\n #include \"mem-pool.h\"\n\n-#define BLOCK_GROWTH_SIZE 1024*1024 - sizeof(struct mp_block);\n+#define BLOCK_GROWTH_SIZE (1024 * 1024 - sizeof(struct mp_block))\n\n /*\n  * Allocate a new mp_block and insert it after the block specified in\n--\n2.30.2\n"}]}