From 9f0bea54102d80b531999def4e15273ab9d2c5f0 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 25 Apr 2023 18:36:34 +0200 Subject: [PATCH] detect: remove DetectEngineCtx members Members were set but not checked. --- src/detect-engine-mpm.c | 2 -- src/detect-engine-prefilter.c | 4 ---- src/detect.h | 4 ---- 3 files changed, 10 deletions(-) diff --git a/src/detect-engine-mpm.c b/src/detect-engine-mpm.c index 9af9c59dac..79c780eda0 100644 --- a/src/detect-engine-mpm.c +++ b/src/detect-engine-mpm.c @@ -2394,8 +2394,6 @@ int DetectSetFastPatternAndItsId(DetectEngineCtx *de_ctx) } } - de_ctx->max_fp_id = max_id; - HashListTableFree(ht); return 0; diff --git a/src/detect-engine-prefilter.c b/src/detect-engine-prefilter.c index 3db303cd1c..99c4b5f9fc 100644 --- a/src/detect-engine-prefilter.c +++ b/src/detect-engine-prefilter.c @@ -438,7 +438,6 @@ void PrefilterSetupRuleGroup(DetectEngineCtx *de_ctx, SigGroupHead *sgh) uint32_t cnt = 0; for (el = sgh->init->pkt_engines ; el != NULL; el = el->next) { cnt++; - de_ctx->prefilter_maxid = MAX(de_ctx->prefilter_maxid, el->gid); } sgh->pkt_engines = SCMallocAligned(cnt * sizeof(PrefilterEngine), CLS); if (sgh->pkt_engines == NULL) { @@ -463,7 +462,6 @@ void PrefilterSetupRuleGroup(DetectEngineCtx *de_ctx, SigGroupHead *sgh) uint32_t cnt = 0; for (el = sgh->init->payload_engines ; el != NULL; el = el->next) { cnt++; - de_ctx->prefilter_maxid = MAX(de_ctx->prefilter_maxid, el->gid); } sgh->payload_engines = SCMallocAligned(cnt * sizeof(PrefilterEngine), CLS); if (sgh->payload_engines == NULL) { @@ -488,7 +486,6 @@ void PrefilterSetupRuleGroup(DetectEngineCtx *de_ctx, SigGroupHead *sgh) uint32_t cnt = 0; for (el = sgh->init->tx_engines ; el != NULL; el = el->next) { cnt++; - de_ctx->prefilter_maxid = MAX(de_ctx->prefilter_maxid, el->gid); } sgh->tx_engines = SCMallocAligned(cnt * sizeof(PrefilterEngine), CLS); if (sgh->tx_engines == NULL) { @@ -565,7 +562,6 @@ void PrefilterSetupRuleGroup(DetectEngineCtx *de_ctx, SigGroupHead *sgh) uint32_t cnt = 0; for (el = sgh->init->frame_engines; el != NULL; el = el->next) { cnt++; - de_ctx->prefilter_maxid = MAX(de_ctx->prefilter_maxid, el->gid); } sgh->frame_engines = SCMallocAligned(cnt * sizeof(PrefilterEngine), CLS); if (sgh->frame_engines == NULL) { diff --git a/src/detect.h b/src/detect.h index f5322f7975..061a406b01 100644 --- a/src/detect.h +++ b/src/detect.h @@ -852,8 +852,6 @@ typedef struct DetectEngineCtx_ { /* max flowbit id that is used */ uint32_t max_fb_id; - uint32_t max_fp_id; - MpmCtxFactoryContainer *mpm_ctx_factory_container; /* maximum recursion depth for content inspection */ @@ -909,8 +907,6 @@ typedef struct DetectEngineCtx_ { struct SCProfileSghDetectCtx_ *profile_sgh_ctx; uint32_t profile_match_logging_threshold; #endif - uint32_t prefilter_maxid; - char config_prefix[64]; enum DetectEngineType type;