From: Victor Julien Date: Fri, 10 Sep 2021 08:19:50 +0000 (+0200) Subject: detect: remove dead code X-Git-Tag: suricata-6.0.4~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44723bf19e47a135a73c0269fa5b3d190883e8fa;p=thirdparty%2Fsuricata.git detect: remove dead code (cherry picked from commit ae89874b066c91675b809e8cf992d780331efb1c) --- diff --git a/src/detect.c b/src/detect.c index d842f586a5..b21612b5e4 100644 --- a/src/detect.c +++ b/src/detect.c @@ -743,7 +743,6 @@ static inline void DetectRulePacketRules( while (match_cnt--) { RULE_PROFILING_START(p); uint8_t alert_flags = 0; - bool state_alert = false; #ifdef PROFILING bool smatch = false; /* signature match */ #endif @@ -805,9 +804,7 @@ static inline void DetectRulePacketRules( DetectRunPostMatch(tv, det_ctx, p, s); if (!(sflags & SIG_FLAG_NOALERT)) { - /* stateful sigs call PacketAlertAppend from DeStateDetectStartDetection */ - if (!state_alert) - PacketAlertAppend(det_ctx, s, p, 0, alert_flags); + PacketAlertAppend(det_ctx, s, p, 0, alert_flags); } else { /* apply actions even if not alerting */ DetectSignatureApplyActions(p, s, alert_flags);