Skip to content

Commit

Permalink
thresholds: syntax fixes
Browse files Browse the repository at this point in the history
Fix syntax of if statement in SigGetThresholdTypeIter()
  • Loading branch information
thus authored and victorjulien committed Jun 4, 2021
1 parent b0b4fab commit f47e437
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions src/detect-engine-threshold.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/detect-engine-threshold.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down

0 comments on commit f47e437

Please sign in to comment.