summaryrefslogtreecommitdiff
path: root/mem-pool.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2021-03-13 16:17:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-17 17:20:16 (GMT)
commit116affac3f9e3d92d633e6fd766e541c1c5b0765 (patch)
treeebc66e5eb80412bca25c7830d1254320486ea6b2 /mem-pool.c
parent3d8cbbf2c35141377a86a57a862e74c270e59a2a (diff)
downloadgit-116affac3f9e3d92d633e6fd766e541c1c5b0765.zip
git-116affac3f9e3d92d633e6fd766e541c1c5b0765.tar.gz
git-116affac3f9e3d92d633e6fd766e541c1c5b0765.tar.bz2
mem-pool: drop trailing semicolon from macro definition
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>
Diffstat (limited to 'mem-pool.c')
-rw-r--r--mem-pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mem-pool.c b/mem-pool.c
index 8401761..ccdcad2 100644
--- a/mem-pool.c
+++ b/mem-pool.c
@@ -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