summaryrefslogtreecommitdiff
path: root/commit-slab-impl.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-06-29 01:22:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-29 17:43:40 (GMT)
commit95bb9d4c326695553b9d5499752e24959e833f82 (patch)
treef08b993b3d120eecf93aeb99f3f3e9d637689f69 /commit-slab-impl.h
parentfd8030c739522acf3f55879b29f4716b36f4d440 (diff)
downloadgit-95bb9d4c326695553b9d5499752e24959e833f82.zip
git-95bb9d4c326695553b9d5499752e24959e833f82.tar.gz
git-95bb9d4c326695553b9d5499752e24959e833f82.tar.bz2
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>
Diffstat (limited to 'commit-slab-impl.h')
-rw-r--r--commit-slab-impl.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/commit-slab-impl.h b/commit-slab-impl.h
index 87a9cad..ac1e6d4 100644
--- a/commit-slab-impl.h
+++ b/commit-slab-impl.h
@@ -11,8 +11,6 @@
#define implement_commit_slab(slabname, elemtype, scope) \
\
-static int stat_ ##slabname## realloc; \
- \
scope void init_ ##slabname## _with_stride(struct slabname *s, \
unsigned stride) \
{ \
@@ -54,7 +52,6 @@ scope elemtype *slabname## _at_peek(struct slabname *s, \
if (!add_if_missing) \
return NULL; \
REALLOC_ARRAY(s->slab, nth_slab + 1); \
- stat_ ##slabname## realloc++; \
for (i = s->slab_count; i <= nth_slab; i++) \
s->slab[i] = NULL; \
s->slab_count = nth_slab + 1; \