Merge 'hv/submodule-config' to 'sb/submodule-helper'
[gitweb.git] / commit-slab.h
index 9d12ce299cb844bd7bd74d0b5813af2932868773..f84b449413d434b8145426503a98bcd4f9ad995f 100644 (file)
@@ -99,8 +99,7 @@ static MAYBE_UNUSED elemtype *slabname## _at_peek(struct slabname *s, \
                int i;                                                  \
                if (!add_if_missing)                                    \
                        return NULL;                                    \
-               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;                              \