Skip to content

Commit ce74e19

Browse files
committed
repo: remove redundant variable shadow in stats_table_print_structure
In stats_table_print_structure(), the variable 'entry' is declared at the top of the loop body and assigned from item->util. Inside the 'if (entry)' block, the same variable is redeclared and assigned identically, shadowing the outer declaration unnecessarily. Remove the inner redeclaration since the outer 'entry' is already available and non-NULL at that point. Signed-off-by: Mansi Singh <mansimaanu8627@gmail.com>
1 parent d8fd4f5 commit ce74e19

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

builtin/repo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ static void stats_table_print_structure(const struct stats_table *table)
412412
const char *unit = "";
413413

414414
if (entry) {
415-
struct stats_table_entry *entry = item->util;
416415
value = entry->value;
417416
if (entry->unit)
418417
unit = entry->unit;

0 commit comments

Comments
 (0)