From: Victor Julien Date: Tue, 25 Apr 2023 18:49:22 +0000 (+0200) Subject: detect: remove unused group counters X-Git-Tag: suricata-7.0.0-rc2~329 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ff28a482b04f20c58497bc431e156f4e68854e3;p=thirdparty%2Fsuricata.git detect: remove unused group counters --- diff --git a/src/detect-engine-build.c b/src/detect-engine-build.c index 3c0e443f80..87e83008fc 100644 --- a/src/detect-engine-build.c +++ b/src/detect-engine-build.c @@ -1056,16 +1056,12 @@ static int RulesGroupByProto(DetectEngineCtx *de_ctx) SigGroupHeadHashAdd(de_ctx, sgh_ts[p]); SigGroupHeadStore(de_ctx, sgh_ts[p]); - - de_ctx->gh_unique++; own++; } else { SCLogDebug("proto group %d sgh %p is a copy", p, sgh_ts[p]); SigGroupHeadFree(de_ctx, sgh_ts[p]); sgh_ts[p] = lookup_sgh; - - de_ctx->gh_reuse++; ref++; } } @@ -1092,8 +1088,6 @@ static int RulesGroupByProto(DetectEngineCtx *de_ctx) SigGroupHeadHashAdd(de_ctx, sgh_tc[p]); SigGroupHeadStore(de_ctx, sgh_tc[p]); - - de_ctx->gh_unique++; own++; } else { @@ -1101,8 +1095,6 @@ static int RulesGroupByProto(DetectEngineCtx *de_ctx) SigGroupHeadFree(de_ctx, sgh_tc[p]); sgh_tc[p] = lookup_sgh; - - de_ctx->gh_reuse++; ref++; } } @@ -1298,7 +1290,6 @@ static DetectPort *RulesGroupByPorts(DetectEngineCtx *de_ctx, uint8_t ipproto, u SigGroupHeadHashAdd(de_ctx, iter->sh); SigGroupHeadStore(de_ctx, iter->sh); iter->flags |= PORT_SIGGROUPHEAD_COPY; - de_ctx->gh_unique++; own++; } else { SCLogDebug("port group %p sgh %p is a copy", iter, iter->sh); @@ -1306,8 +1297,6 @@ static DetectPort *RulesGroupByPorts(DetectEngineCtx *de_ctx, uint8_t ipproto, u SigGroupHeadFree(de_ctx, iter->sh); iter->sh = lookup_sgh; iter->flags |= PORT_SIGGROUPHEAD_COPY; - - de_ctx->gh_reuse++; ref++; } } diff --git a/src/detect.h b/src/detect.h index 061a406b01..e07ca7fa39 100644 --- a/src/detect.h +++ b/src/detect.h @@ -820,8 +820,6 @@ typedef struct DetectEngineCtx_ { /* main sigs */ DetectEngineLookupFlow flow_gh[FLOW_STATES]; - uint32_t gh_unique, gh_reuse; - /* init phase vars */ HashListTable *sgh_hash_table;