Skip to content

Commit ecaebf4

Browse files
author
Junio C Hamano
committed
Spell default packedgitlimit slightly differently
This is shorter and easier to read, and also makes sure the constant expression does not overflow integer range. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 22bac0e commit ecaebf4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

git-compat-util.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ extern int git_munmap(void *start, size_t length);
105105
#endif /* NO_MMAP */
106106

107107
#define DEFAULT_PACKED_GIT_LIMIT \
108-
(sizeof(void*) >= 8 \
109-
? 8 * 1024 * 1024 * 1024 \
110-
: 256 * 1024 * 1024)
108+
((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
111109

112110
#ifdef NO_SETENV
113111
#define setenv gitsetenv

0 commit comments

Comments
 (0)