]> 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>
Thu, 16 Sep 2021 09:36:54 +0000 (11:36 +0200)
src/detect.c

index 2cdcfa7ab470b195f60b1b167fe43616895720be..8d8c5038331f0fd65906735276f060945c0ec8dc 100644 (file)
@@ -745,7 +745,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
@@ -802,9 +801,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);