From 2756ca4347cbda05b16954cd7f445c216b935e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Tue, 16 Sep 2014 20:56:57 +0200 Subject: use REALLOC_ARRAY for changing the allocation size of arrays Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- commit-slab.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'commit-slab.h') 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; \ -- cgit v1.2.3