memory_limit_check(): allow a limit that does not fit in "int"
commit37f77acf1ff2900b86cf48a05da2d5ef15e84015
authorSteffen Prohaska <prohaska@zib.de>
Fri, 22 Aug 2014 14:01:22 +0000 (22 16:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Aug 2014 18:14:00 +0000 (22 11:14 -0700)
treeabc547503e4d0721957851341c109bbf3c7a8fe9
parenta198eb7600a4fa2256355df18db5f1f5b8e43dd7
memory_limit_check(): allow a limit that does not fit in "int"

GIT_ALLOC_LIMIT limits xmalloc()'s size, which is of type size_t.
Use ssize_t to store the limit, not "int" which may be smaller.  The
change has no direct practical impact, because we use it primarily
to test small sizes.

The cast of size in the call to die() is changed to uintmax_t to
match the format string PRIuMAX.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wrapper.c