]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
thresholds: syntax fixes
authorMats Klepsland <mats.klepsland@gmail.com>
Thu, 27 May 2021 09:04:15 +0000 (11:04 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 4 Jun 2021 08:36:49 +0000 (10:36 +0200)
Fix syntax of if statement in SigGetThresholdTypeIter()

src/detect-engine-threshold.c
src/detect-engine-threshold.h

index 09aaacde9107d6f70388b683fd5326809b786340..28e50d5be7863ab6702cf1977aa9ced630ba70a7 100644 (file)
@@ -110,9 +110,8 @@ int ThresholdIPPairHasThreshold(IPPair *pair)
  *
  * \retval tsh Return the threshold data from signature or NULL if not found
  */
-const DetectThresholdData *SigGetThresholdTypeIter(const Signature *sig,
-                                                   const SigMatchData **psm,
-                                                   int list)
+const DetectThresholdData *SigGetThresholdTypeIter(
+        const Signature *sig, const SigMatchData **psm, int list)
 {
     const SigMatchData *smd = NULL;
     const DetectThresholdData *tsh = NULL;
@@ -128,9 +127,7 @@ const DetectThresholdData *SigGetThresholdTypeIter(const Signature *sig,
     }
 
     while (1) {
-        if (smd->type == DETECT_THRESHOLD ||
-            smd->type == DETECT_DETECTION_FILTER)
-        {
+        if (smd->type == DETECT_THRESHOLD || smd->type == DETECT_DETECTION_FILTER) {
             tsh = (DetectThresholdData *)smd->ctx;
 
             if (smd->is_last) {
index 5f7196e81e348490f5c66c37748e796751f4e58d..09af50153610af00ffaeaa69763d713896968372 100644 (file)
@@ -37,8 +37,8 @@ int ThresholdHostHasThreshold(Host *);
 
 int ThresholdIPPairHasThreshold(IPPair *pair);
 
-const DetectThresholdData *SigGetThresholdTypeIter(const Signature *,
-        const SigMatchData **, int list);
+const DetectThresholdData *SigGetThresholdTypeIter(
+        const Signature *, const SigMatchData **, int list);
 int PacketAlertThreshold(DetectEngineCtx *, DetectEngineThreadCtx *,
         const DetectThresholdData *, Packet *,
         const Signature *, PacketAlert *);