]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: remove unused group counters
authorVictor Julien <vjulien@oisf.net>
Tue, 25 Apr 2023 18:49:22 +0000 (20:49 +0200)
committerVictor Julien <vjulien@oisf.net>
Wed, 26 Apr 2023 04:34:21 +0000 (06:34 +0200)
src/detect-engine-build.c
src/detect.h

index 3c0e443f80c73e6773b0c7c3d9d6c112d343256c..87e83008fc9d07b9cbbe825ed3e3690610e9b888 100644 (file)
@@ -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++;
         }
     }
index 061a406b01a341dd231812f5e97751f07a9da063..e07ca7fa3949ca302d697172882869794125fc79 100644 (file)
@@ -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;