]> git.ipfire.org Git - thirdparty/git.git/commit
git-compat-util.h: drop trailing semicolon from macro definition
authorRené Scharfe <l.s.r@web.de>
Sat, 13 Mar 2021 16:10:47 +0000 (17:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 13 Mar 2021 23:56:13 +0000 (15:56 -0800)
commitf1121499e6460e814ec3cffa0b18942ac529f768
tree21b2e97b9e51aa208c9365b4f016c1c9c7b4c450
parent13d7ab6b5d7929825b626f050b62a11241ea4945
git-compat-util.h: drop trailing semicolon from macro definition

Make CALLOC_ARRAY usable like a function by requiring callers to supply
the trailing semicolon, which all of the current ones already do.  With
the extra semicolon e.g. the following code wouldn't compile because it
disconnects the "else" from the "if":

if (condition)
CALLOC_ARRAY(ptr, n);
else
whatever();

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h