diff options
author | René Scharfe <l.s.r@web.de> | 2014-09-16 20:56:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-18 09:13:42 -0700 |
commit | 2756ca4347cbda05b16954cd7f445c216b935e76 (patch) | |
tree | 70afb2d44557fd05bbc0707c190c6026ab6135fd /commit-slab.h | |
parent | 3ac22f82edec108986b2627fcd6f2a8039617a23 (diff) | |
download | git-2756ca4347cbda05b16954cd7f445c216b935e76.tar.gz |
use REALLOC_ARRAY for changing the allocation size of arraysrs/realloc-array
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-slab.h')
-rw-r--r-- | commit-slab.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/commit-slab.h b/commit-slab.h index 375c9c751a..f37ec3831f 100644 --- a/commit-slab.h +++ b/commit-slab.h @@ -90,8 +90,7 @@ static MAYBE_UNUSED elemtype *slabname## _at(struct slabname *s, \ \ if (s->slab_count <= nth_slab) { \ int i; \ - s->slab = xrealloc(s->slab, \ - (nth_slab + 1) * sizeof(*s->slab)); \ + REALLOC_ARRAY(s->slab, nth_slab + 1); \ stat_ ##slabname## realloc++; \ for (i = s->slab_count; i <= nth_slab; i++) \ s->slab[i] = NULL; \ |