thresholds: syntax fixes

Fix syntax of if statement in SigGetThresholdTypeIter()
pull/6172/head
Mats Klepsland 4 years ago committed by Victor Julien
parent b0b4fab794
commit f47e4375b3

@ -110,9 +110,8 @@ int ThresholdIPPairHasThreshold(IPPair *pair)
* *
* \retval tsh Return the threshold data from signature or NULL if not found * \retval tsh Return the threshold data from signature or NULL if not found
*/ */
const DetectThresholdData *SigGetThresholdTypeIter(const Signature *sig, const DetectThresholdData *SigGetThresholdTypeIter(
const SigMatchData **psm, const Signature *sig, const SigMatchData **psm, int list)
int list)
{ {
const SigMatchData *smd = NULL; const SigMatchData *smd = NULL;
const DetectThresholdData *tsh = NULL; const DetectThresholdData *tsh = NULL;
@ -128,9 +127,7 @@ const DetectThresholdData *SigGetThresholdTypeIter(const Signature *sig,
} }
while (1) { while (1) {
if (smd->type == DETECT_THRESHOLD || if (smd->type == DETECT_THRESHOLD || smd->type == DETECT_DETECTION_FILTER) {
smd->type == DETECT_DETECTION_FILTER)
{
tsh = (DetectThresholdData *)smd->ctx; tsh = (DetectThresholdData *)smd->ctx;
if (smd->is_last) { if (smd->is_last) {

@ -37,8 +37,8 @@ int ThresholdHostHasThreshold(Host *);
int ThresholdIPPairHasThreshold(IPPair *pair); int ThresholdIPPairHasThreshold(IPPair *pair);
const DetectThresholdData *SigGetThresholdTypeIter(const Signature *, const DetectThresholdData *SigGetThresholdTypeIter(
const SigMatchData **, int list); const Signature *, const SigMatchData **, int list);
int PacketAlertThreshold(DetectEngineCtx *, DetectEngineThreadCtx *, int PacketAlertThreshold(DetectEngineCtx *, DetectEngineThreadCtx *,
const DetectThresholdData *, Packet *, const DetectThresholdData *, Packet *,
const Signature *, PacketAlert *); const Signature *, PacketAlert *);

Loading…
Cancel
Save