commit-slabs: remove realloc counter outside of slab struct

The realloc counter is declared outside the struct for the given slabname, which makes it harder for a follow up patch to move the declaration of the struct around as then the counter variable would need special treatment. As the reallocation counter is currently unused we can just remove it. If we ever need to count the reallocations again, we can reintroduce the counter as part of 'struct slabname' in commit-slab-decl.h. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Jun 28, 2018 at 18:22 UTC 95bb9d4c326695553b9d5499752e24959e833f82
1 file changed -3
commit-slab-impl.h
-3
@@ -11,8 +11,6 @@
11
12 #define implement_commit_slab(slabname, elemtype, scope) \
13 \
14 -static int stat_ ##slabname## realloc; \
15 - \
14 scope void init_ ##slabname## _with_stride(struct slabname *s, \
15 unsigned stride) \
16 { \
@@ -54,7 +52,6 @@ scope elemtype *slabname## _at_peek(struct slabname *s, \
52 if (!add_if_missing) \
53 return NULL; \
54 REALLOC_ARRAY(s->slab, nth_slab + 1); \
57 - stat_ ##slabname## realloc++; \
55 for (i = s->slab_count; i <= nth_slab; i++) \
56 s->slab[i] = NULL; \
57 s->slab_count = nth_slab + 1; \