From b40ecb73563ca4acb034ae69aefeea08aa48b467 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 7 Jul 2016 09:29:36 +0200 Subject: [PATCH] mpm method: remove unused function args --- src/detect-engine-hmd.c | 11 +++-------- src/detect-engine-hmd.h | 6 +++--- src/detect.c | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/detect-engine-hmd.c b/src/detect-engine-hmd.c index 64d63cae4e..391a623b11 100644 --- a/src/detect-engine-hmd.c +++ b/src/detect-engine-hmd.c @@ -68,14 +68,12 @@ * \retval ret Number of matches. */ static inline uint32_t HttpMethodPatternSearch(DetectEngineThreadCtx *det_ctx, - const uint8_t *raw_method, const uint32_t raw_method_len, - const uint8_t flags) + const uint8_t *raw_method, const uint32_t raw_method_len) { SCEnter(); uint32_t ret = 0; - DEBUG_VALIDATE_BUG_ON(flags & STREAM_TOCLIENT); DEBUG_VALIDATE_BUG_ON(det_ctx->sgh->mpm_hmd_ctx_ts == NULL); if (raw_method_len >= det_ctx->sgh->mpm_hmd_ctx_ts->minlen) { @@ -87,9 +85,7 @@ static inline uint32_t HttpMethodPatternSearch(DetectEngineThreadCtx *det_ctx, SCReturnUInt(ret); } -int DetectEngineRunHttpMethodMpm(DetectEngineThreadCtx *det_ctx, Flow *f, - HtpState *htp_state, uint8_t flags, - void *txv, uint64_t idx) +int DetectEngineRunHttpMethodMpm(DetectEngineThreadCtx *det_ctx, void *txv) { uint32_t cnt = 0; htp_tx_t *tx = (htp_tx_t *)txv; @@ -98,8 +94,7 @@ int DetectEngineRunHttpMethodMpm(DetectEngineThreadCtx *det_ctx, Flow *f, cnt = HttpMethodPatternSearch(det_ctx, (const uint8_t *)bstr_ptr(tx->request_method), - bstr_len(tx->request_method), - flags); + bstr_len(tx->request_method)); end: return cnt; } diff --git a/src/detect-engine-hmd.h b/src/detect-engine-hmd.h index faf26aa2e2..c176755a66 100644 --- a/src/detect-engine-hmd.h +++ b/src/detect-engine-hmd.h @@ -31,9 +31,9 @@ int DetectEngineInspectHttpMethod(ThreadVars *tv, Signature *s, Flow *f, uint8_t flags, void *alstate, void *tx, uint64_t tx_id); -int DetectEngineRunHttpMethodMpm(DetectEngineThreadCtx *det_ctx, Flow *f, - HtpState *htp_state, uint8_t flags, - void *tx, uint64_t idx); + +int DetectEngineRunHttpMethodMpm(DetectEngineThreadCtx *det_ctx, void *txv); + void DetectEngineHttpMethodRegisterTests(void); #endif /* __DETECT_ENGINE_HMD_H__ */ diff --git a/src/detect.c b/src/detect.c index 81eda3dc72..9cb6436306 100644 --- a/src/detect.c +++ b/src/detect.c @@ -914,7 +914,7 @@ static inline void DetectMpmPrefilter(DetectEngineCtx *de_ctx, } if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_HMD) { PACKET_PROFILING_DETECT_START(p, PROF_DETECT_MPM_HMD); - DetectEngineRunHttpMethodMpm(det_ctx, p->flow, alstate, flags, tx, idx); + DetectEngineRunHttpMethodMpm(det_ctx, tx); PACKET_PROFILING_DETECT_END(p, PROF_DETECT_MPM_HMD); } }