From 5a97303dcfbe78f9c417442505ac130d540565eb Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 25 Apr 2021 04:31:20 +0800 Subject: [PATCH] Remove the real unused new_c variable in alloc_slots Signed-off-by: Xiang Xiao Change-Id: Ida0a1df67ecdb83a983b4bea93f411fc485482a9 --- chunk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/chunk.c b/chunk.c index 9f3d52f8..21300353 100644 --- a/chunk.c +++ b/chunk.c @@ -445,7 +445,7 @@ static void *alloc_slots(const int level_n) skip_alloc_t *new_p; entry_block_t *block_p; unsigned int *magic3_p, magic3; - int size, new_c; + int size; if (BIT_IS_SET(_dmalloc_flags, DMALLOC_DEBUG_LOG_ADMIN)) { dmalloc_message("need a block of slots for level %d", level_n); @@ -482,14 +482,12 @@ static void *alloc_slots(const int level_n) size = SKIP_SLOT_SIZE(level_n); /* add in all of the unused slots to the linked list */ - new_c = 1; for (new_p = &block_p->eb_first_slot; (char *)new_p + size < (char *)magic3_p; new_p = (skip_alloc_t *)((char *)new_p + size)) { new_p->sa_level_n = level_n; new_p->sa_next_p[0] = entry_free_list[level_n]; entry_free_list[level_n] = new_p; - new_c++; } /* extern pointer information set in _dmalloc_heap_alloc */