]> git.ipfire.org Git - thirdparty/git.git/commitdiff
mem-pool: drop trailing semicolon from macro definition
authorRené Scharfe <l.s.r@web.de>
Sat, 13 Mar 2021 16:17:37 +0000 (17:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Mar 2021 17:20:16 +0000 (10:20 -0700)
Allow BLOCK_GROWTH_SIZE to be used like an integer literal by removing
the trailing semicolon from its definition.  Also wrap the expression in
parentheses, to allow it to be used with operators without leading to
unexpected results.  It doesn't matter for the current use site, but
make it follow standard macro rules anyway to avoid future surprises.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mem-pool.c

index 8401761dda0a2a585f6593e2212ff41db7135170..ccdcad2e3d622fdd9491d3d1cbdc26f673bb41df 100644 (file)
@@ -5,7 +5,7 @@
 #include "cache.h"
 #include "mem-pool.h"
 
-#define BLOCK_GROWTH_SIZE 1024*1024 - sizeof(struct mp_block);
+#define BLOCK_GROWTH_SIZE (1024 * 1024 - sizeof(struct mp_block))
 
 /*
  * Allocate a new mp_block and insert it after the block specified in