From 18e4e032dbb8516e7c7d0dfa894783b2011da313 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 27 Apr 2022 21:27:50 +0200 Subject: [PATCH] thash: reduce scope for var; suggested by cppcheck --- src/util-thash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util-thash.c b/src/util-thash.c index 90ecb2694d..4c20713199 100644 --- a/src/util-thash.c +++ b/src/util-thash.c @@ -346,7 +346,6 @@ void THashConsolidateMemcap(THashTableContext *ctx) void THashShutdown(THashTableContext *ctx) { THashData *h; - uint32_t u; /* free spare queue */ while ((h = THashDataDequeue(&ctx->spare_q))) { @@ -356,7 +355,7 @@ void THashShutdown(THashTableContext *ctx) /* clear and free the hash */ if (ctx->array != NULL) { - for (u = 0; u < ctx->config.hash_size; u++) { + for (uint32_t u = 0; u < ctx->config.hash_size; u++) { h = ctx->array[u].head; while (h) { THashData *n = h->next;