From 98423a000922cae361fc0270d3b92bba7cb48c69 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sun, 23 Feb 2025 12:03:03 +0100 Subject: [PATCH] detect: constify arguments --- src/detect-engine-alert.c | 4 ++-- src/detect-engine-threshold.c | 2 +- src/detect-engine-threshold.h | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/detect-engine-alert.c b/src/detect-engine-alert.c index 01452ecf89..9e9a499bb5 100644 --- a/src/detect-engine-alert.c +++ b/src/detect-engine-alert.c @@ -69,8 +69,8 @@ void PacketAlertTagInit(void) * \retval 1 alert is not suppressed * \retval 0 alert is suppressed */ -static int PacketAlertHandle(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, - const Signature *s, Packet *p, PacketAlert *pa) +static int PacketAlertHandle(const DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, + const Signature *s, Packet *p, PacketAlert *pa) { SCEnter(); int ret = 1; diff --git a/src/detect-engine-threshold.c b/src/detect-engine-threshold.c index c9ca8fa4a4..38a7accf74 100644 --- a/src/detect-engine-threshold.c +++ b/src/detect-engine-threshold.c @@ -947,7 +947,7 @@ static int ThresholdHandlePacketFlow(Flow *f, Packet *p, const DetectThresholdDa * \retval 1 alert on this event * \retval 0 do not alert on this event */ -int PacketAlertThreshold(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, +int PacketAlertThreshold(const DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const DetectThresholdData *td, Packet *p, const Signature *s, PacketAlert *pa) { SCEnter(); diff --git a/src/detect-engine-threshold.h b/src/detect-engine-threshold.h index 086dba497a..cb1b09fbbb 100644 --- a/src/detect-engine-threshold.h +++ b/src/detect-engine-threshold.h @@ -35,9 +35,8 @@ uint32_t ThresholdsExpire(const SCTime_t ts); const DetectThresholdData *SigGetThresholdTypeIter( const Signature *, const SigMatchData **, int list); -int PacketAlertThreshold(DetectEngineCtx *, DetectEngineThreadCtx *, - const DetectThresholdData *, Packet *, - const Signature *, PacketAlert *); +int PacketAlertThreshold(const DetectEngineCtx *, DetectEngineThreadCtx *, + const DetectThresholdData *, Packet *, const Signature *, PacketAlert *); void ThresholdListFree(void *ptr); void ThresholdCacheThreadFree(void); -- 2.47.2