From 1380853ee859e589e43ba5e2e2790d2b32785c0a Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 7 Jul 2016 09:34:43 +0200 Subject: [PATCH] mpm host: remove unused function args --- src/detect-engine-hhhd.c | 10 +++------- src/detect-engine-hhhd.h | 6 +++--- src/detect.c | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/detect-engine-hhhd.c b/src/detect-engine-hhhd.c index 43af0b9e9a..fbd4580d5c 100644 --- a/src/detect-engine-hhhd.c +++ b/src/detect-engine-hhhd.c @@ -71,14 +71,12 @@ * \retval ret Number of matches. */ static inline uint32_t HttpHHPatternSearch(DetectEngineThreadCtx *det_ctx, - const uint8_t *hh, const uint32_t hh_len, - const uint8_t flags) + const uint8_t *hh, const uint32_t hh_len) { SCEnter(); uint32_t ret = 0; - DEBUG_VALIDATE_BUG_ON(flags & STREAM_TOCLIENT); DEBUG_VALIDATE_BUG_ON(det_ctx->sgh->mpm_hhhd_ctx_ts == NULL); if (hh_len >= det_ctx->sgh->mpm_hhhd_ctx_ts->minlen) { @@ -90,9 +88,7 @@ static inline uint32_t HttpHHPatternSearch(DetectEngineThreadCtx *det_ctx, SCReturnUInt(ret); } -int DetectEngineRunHttpHHMpm(DetectEngineThreadCtx *det_ctx, Flow *f, - HtpState *htp_state, uint8_t flags, - void *txv, uint64_t idx) +int DetectEngineRunHttpHHMpm(DetectEngineThreadCtx *det_ctx, void *txv) { uint32_t cnt = 0; htp_tx_t *tx = (htp_tx_t *)txv; @@ -103,7 +99,7 @@ int DetectEngineRunHttpHHMpm(DetectEngineThreadCtx *det_ctx, Flow *f, goto end; const uint32_t hname_len = bstr_len(tx->request_hostname); - cnt = HttpHHPatternSearch(det_ctx, hname, hname_len, flags); + cnt = HttpHHPatternSearch(det_ctx, hname, hname_len); end: return cnt; diff --git a/src/detect-engine-hhhd.h b/src/detect-engine-hhhd.h index e6cec9071c..fdfed26a2b 100644 --- a/src/detect-engine-hhhd.h +++ b/src/detect-engine-hhhd.h @@ -31,9 +31,9 @@ int DetectEngineInspectHttpHH(ThreadVars *tv, Signature *s, Flow *f, uint8_t flags, void *alstate, void *tx, uint64_t tx_id); -int DetectEngineRunHttpHHMpm(DetectEngineThreadCtx *det_ctx, Flow *f, - HtpState *htp_state, uint8_t flags, - void *tx, uint64_t idx); + +int DetectEngineRunHttpHHMpm(DetectEngineThreadCtx *det_ctx, void *txv); + void DetectEngineHttpHHRegisterTests(void); #endif /* __DETECT_ENGINE_HHHD_H__ */ diff --git a/src/detect.c b/src/detect.c index 9cb6436306..a0cf82264f 100644 --- a/src/detect.c +++ b/src/detect.c @@ -922,7 +922,7 @@ static inline void DetectMpmPrefilter(DetectEngineCtx *de_ctx, if (tx_progress >= HTP_REQUEST_HEADERS) { if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_HHHD) { PACKET_PROFILING_DETECT_START(p, PROF_DETECT_MPM_HHHD); - DetectEngineRunHttpHHMpm(det_ctx, p->flow, alstate, flags, tx, idx); + DetectEngineRunHttpHHMpm(det_ctx, tx); PACKET_PROFILING_DETECT_END(p, PROF_DETECT_MPM_HHHD); } if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_HRHHD) {