]> 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 12:18:22 +0000 (14:18 +0200)
(cherry picked from commit ae89874b066c91675b809e8cf992d780331efb1c)

src/detect.c

index face274c1e00714f5a17e40b1ad32b9e5d87b8b4..3c4f3d709a02f72fca54dc0cc58213872010ad65 100644 (file)
@@ -744,7 +744,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
@@ -806,9 +805,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);