From 4229e603f0b47469e1ada05248824dbed91928eb Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 7 Jul 2016 09:37:30 +0200 Subject: [PATCH] mpm raw host: remove unused function args --- src/detect-engine-hrhhd.c | 11 +++-------- src/detect-engine-hrhhd.h | 6 +++--- src/detect.c | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/detect-engine-hrhhd.c b/src/detect-engine-hrhhd.c index b0a9f1134a..3debb11a37 100644 --- a/src/detect-engine-hrhhd.c +++ b/src/detect-engine-hrhhd.c @@ -66,19 +66,16 @@ * \param det_ctx Detection engine thread ctx. * \param hrh Raw hostname to inspect. * \param hrh_len Raw hostname buffer length. - * \param flags Flags * * \retval ret Number of matches. */ static inline uint32_t HttpHRHPatternSearch(DetectEngineThreadCtx *det_ctx, - const uint8_t *hrh, const uint32_t hrh_len, - const uint8_t flags) + const uint8_t *hrh, const uint32_t hrh_len) { SCEnter(); uint32_t ret = 0; - DEBUG_VALIDATE_BUG_ON(flags & STREAM_TOCLIENT); DEBUG_VALIDATE_BUG_ON(det_ctx->sgh->mpm_hrhhd_ctx_ts == NULL); if (hrh_len >= det_ctx->sgh->mpm_hrhhd_ctx_ts->minlen) { @@ -90,9 +87,7 @@ static inline uint32_t HttpHRHPatternSearch(DetectEngineThreadCtx *det_ctx, SCReturnUInt(ret); } -int DetectEngineRunHttpHRHMpm(DetectEngineThreadCtx *det_ctx, Flow *f, - HtpState *htp_state, uint8_t flags, - void *txv, uint64_t idx) +int DetectEngineRunHttpHRHMpm(DetectEngineThreadCtx *det_ctx, void *txv) { uint32_t cnt = 0; htp_tx_t *tx = (htp_tx_t *)txv; @@ -119,7 +114,7 @@ int DetectEngineRunHttpHRHMpm(DetectEngineThreadCtx *det_ctx, Flow *f, } if (hname != NULL) { - cnt = HttpHRHPatternSearch(det_ctx, hname, hname_len, flags); + cnt = HttpHRHPatternSearch(det_ctx, hname, hname_len); } end: diff --git a/src/detect-engine-hrhhd.h b/src/detect-engine-hrhhd.h index 24c3b43e21..c939a173f0 100644 --- a/src/detect-engine-hrhhd.h +++ b/src/detect-engine-hrhhd.h @@ -31,9 +31,9 @@ int DetectEngineInspectHttpHRH(ThreadVars *tv, Signature *s, Flow *f, uint8_t flags, void *alstate, void *tx, uint64_t tx_id); -int DetectEngineRunHttpHRHMpm(DetectEngineThreadCtx *det_ctx, Flow *f, - HtpState *htp_state, uint8_t flags, - void *tx, uint64_t idx); + +int DetectEngineRunHttpHRHMpm(DetectEngineThreadCtx *det_ctx, void *txv); + void DetectEngineHttpHRHRegisterTests(void); #endif /* __DETECT_ENGINE_HRHHD_H__ */ diff --git a/src/detect.c b/src/detect.c index a0cf82264f..4aab3172d0 100644 --- a/src/detect.c +++ b/src/detect.c @@ -927,7 +927,7 @@ static inline void DetectMpmPrefilter(DetectEngineCtx *de_ctx, } if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_HRHHD) { PACKET_PROFILING_DETECT_START(p, PROF_DETECT_MPM_HRHHD); - DetectEngineRunHttpHRHMpm(det_ctx, p->flow, alstate, flags, tx, idx); + DetectEngineRunHttpHRHMpm(det_ctx, tx); PACKET_PROFILING_DETECT_END(p, PROF_DETECT_MPM_HRHHD); } if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_HCD) {