From: Victor Julien Date: Wed, 27 Apr 2022 19:27:50 +0000 (+0200) Subject: thash: reduce scope for var; suggested by cppcheck X-Git-Tag: suricata-7.0.0-beta1~601 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=18e4e032dbb8516e7c7d0dfa894783b2011da313;p=thirdparty%2Fsuricata.git thash: reduce scope for var; suggested by cppcheck --- 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;