From f32177e2154e06da60dd264a478101b5ea9ef8c1 Mon Sep 17 00:00:00 2001 From: Mats Klepsland Date: Thu, 27 May 2021 11:04:15 +0200 Subject: [PATCH] thresholds: syntax fixes Fix syntax of if statement in SigGetThresholdTypeIter() (cherry picked from commit f47e4375b3310554c13561efb2f382f04bd24340) --- src/detect-engine-threshold.c | 9 +++------ src/detect-engine-threshold.h | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) 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 *); -- 2.47.3