1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-18 20:13:52 +02:00

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>
This commit is contained in:
René Scharfe 2021-03-13 17:17:37 +01:00 committed by Junio C Hamano
parent 3d8cbbf2c3
commit 116affac3f

View 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