]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: remove dead code
authorVictor Julien <victor@inliniac.net>
Fri, 10 Sep 2021 08:19:50 +0000 (10:19 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 28 Sep 2021 07:58:22 +0000 (09:58 +0200)
(cherry picked from commit ae89874b066c91675b809e8cf992d780331efb1c)

src/detect.c

index d842f586a5ae4e8a0d13b4b8d7209f0f10ae5274..b21612b5e4ecb93801b9ebc0a8f988fe209566d7 100644 (file)
@@ -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);