From 2e1705e54a06062454fb3ab71671171e686504a4 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 24 Nov 2025 17:05:43 +0100 Subject: [PATCH] counters: minor code cleanup --- src/counters.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/counters.c b/src/counters.c index 8c20144a9f..490769c21b 100644 --- a/src/counters.c +++ b/src/counters.c @@ -697,7 +697,6 @@ static void StatsCopyCounterValue(StatsLocalCounter *pcae) static int StatsOutput(ThreadVars *tv) { const StatsThreadStore *sts = NULL; - const StatsCounter *pc = NULL; void *td = stats_thread_data; if (counters_global_id == 0) @@ -762,7 +761,7 @@ static int StatsOutput(ThreadVars *tv) max_id * sizeof(struct CountersMergeTable)); SCMutexLock(&sts->ctx->m); - pc = sts->ctx->head; + const StatsCounter *pc = sts->ctx->head; while (pc != NULL) { SCLogDebug("Counter %s (%u:%u) value %"PRIu64, pc->name, pc->id, pc->gid, pc->value);