]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
reputation: minor cleanup
authorVictor Julien <vjulien@oisf.net>
Mon, 13 May 2024 12:37:02 +0000 (14:37 +0200)
committerVictor Julien <victor@inliniac.net>
Sat, 15 Jun 2024 13:43:28 +0000 (15:43 +0200)
No need to init ptrs to NULL after SCCalloc.

src/reputation.c

index 055aca13908fd62912eec47eba4e0b28d439c962..88ee1b7ce5e3991f5763404e26284a2393f65e8a 100644 (file)
@@ -580,18 +580,12 @@ int SRepInit(DetectEngineCtx *de_ctx)
     ConfNode *file = NULL;
     const char *filename = NULL;
     int init = 0;
-    int i = 0;
 
     de_ctx->srepCIDR_ctx = (SRepCIDRTree *)SCCalloc(1, sizeof(SRepCIDRTree));
     if (de_ctx->srepCIDR_ctx == NULL)
         exit(EXIT_FAILURE);
     SRepCIDRTree *cidr_ctx = de_ctx->srepCIDR_ctx;
 
-    for (i = 0; i < SREP_MAX_CATS; i++) {
-        cidr_ctx->srepIPV4_tree[i] = NULL;
-        cidr_ctx->srepIPV6_tree[i] = NULL;
-    }
-
     if (SRepGetVersion() == 0) {
         SC_ATOMIC_INIT(srep_eversion);
         init = 1;