detect: remove DetectEngineCtx members

Members were set but not checked.
pull/8766/head
Victor Julien 2 years ago
parent 9ce967da53
commit 9f0bea5410

@ -2394,8 +2394,6 @@ int DetectSetFastPatternAndItsId(DetectEngineCtx *de_ctx)
}
}
de_ctx->max_fp_id = max_id;
HashListTableFree(ht);
return 0;

@ -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) {

@ -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;

Loading…
Cancel
Save