Skip to content

Commit 116affa

Browse files
rscharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3d8cbbf commit 116affa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mem-pool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "cache.h"
66
#include "mem-pool.h"
77

8-
#define BLOCK_GROWTH_SIZE 1024*1024 - sizeof(struct mp_block);
8+
#define BLOCK_GROWTH_SIZE (1024 * 1024 - sizeof(struct mp_block))
99

1010
/*
1111
* Allocate a new mp_block and insert it after the block specified in

0 commit comments

Comments
 (0)