]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: remove DetectEngineCtx members
authorVictor Julien <vjulien@oisf.net>
Tue, 25 Apr 2023 16:36:34 +0000 (18:36 +0200)
committerVictor Julien <vjulien@oisf.net>
Wed, 26 Apr 2023 04:34:21 +0000 (06:34 +0200)
Members were set but not checked.

src/detect-engine-mpm.c
src/detect-engine-prefilter.c
src/detect.h

index 9af9c59dac711de2289b7a11306175f7636b650f..79c780eda0b92f5c7d4893be571b674e6d085155 100644 (file)
@@ -2394,8 +2394,6 @@ int DetectSetFastPatternAndItsId(DetectEngineCtx *de_ctx)
         }
     }
 
-    de_ctx->max_fp_id = max_id;
-
     HashListTableFree(ht);
 
     return 0;
index 3db303cd1c5528a0404b5b18421c394f693d31e6..99c4b5f9fcc6a69e55a95b6192b2834fc20ba390 100644 (file)
@@ -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) {
index f5322f7975dd3eeaa0654af46bde4a3aef2fdb3d..061a406b01a341dd231812f5e97751f07a9da063 100644 (file)
@@ -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;