From: Victor Julien Date: Sun, 23 Feb 2025 11:03:03 +0000 (+0100) Subject: detect: constify arguments X-Git-Tag: suricata-8.0.0-beta1~373 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98423a000922cae361fc0270d3b92bba7cb48c69;p=thirdparty%2Fsuricata.git detect: constify arguments --- 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);