]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
thash: reduce scope for var; suggested by cppcheck
authorVictor Julien <vjulien@oisf.net>
Wed, 27 Apr 2022 19:27:50 +0000 (21:27 +0200)
committerVictor Julien <vjulien@oisf.net>
Mon, 9 May 2022 14:07:06 +0000 (16:07 +0200)
src/util-thash.c

index 90ecb2694d9867493f66ff6224c338ad630341bc..4c20713199986de7f809e0bd36d7075d374cab67 100644 (file)
@@ -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;