From: Mats Klepsland Date: Thu, 27 May 2021 09:04:15 +0000 (+0200) Subject: thresholds: syntax fixes X-Git-Tag: suricata-6.0.3~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f32177e2154e06da60dd264a478101b5ea9ef8c1;p=thirdparty%2Fsuricata.git thresholds: syntax fixes Fix syntax of if statement in SigGetThresholdTypeIter() (cherry picked from commit f47e4375b3310554c13561efb2f382f04bd24340) --- diff --git a/src/detect-engine-threshold.c b/src/detect-engine-threshold.c index 9c021a8256..d98931de95 100644 --- a/src/detect-engine-threshold.c +++ b/src/detect-engine-threshold.c @@ -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) { diff --git a/src/detect-engine-threshold.h b/src/detect-engine-threshold.h index 0a631f13d6..e3115b873f 100644 --- a/src/detect-engine-threshold.h +++ b/src/detect-engine-threshold.h @@ -36,8 +36,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 *);