detect/file: minor cleanup

pull/5635/head
Victor Julien 5 years ago
parent cd146adef0
commit 48094b05c8

@ -65,9 +65,8 @@
* \retval 2 can't match * \retval 2 can't match
* \retval 3 can't match filestore signature * \retval 3 can't match filestore signature
*/ */
static int DetectFileInspect(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, static int DetectFileInspect(DetectEngineThreadCtx *det_ctx, Flow *f, const Signature *s,
Flow *f, const Signature *s, const SigMatchData *smd, const SigMatchData *smd, uint8_t flags, FileContainer *ffc)
uint8_t flags, FileContainer *ffc)
{ {
int r = 0; int r = 0;
int match = 0; int match = 0;
@ -216,10 +215,9 @@ static int DetectFileInspect(ThreadVars *tv, DetectEngineThreadCtx *det_ctx,
* *
* \note flow is not locked at this time * \note flow is not locked at this time
*/ */
int DetectFileInspectGeneric(ThreadVars *tv, int DetectFileInspectGeneric(ThreadVars *_tv, DetectEngineCtx *de_ctx,
DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, DetectEngineThreadCtx *det_ctx, const Signature *s, const SigMatchData *smd, Flow *f,
const Signature *s, const SigMatchData *smd, uint8_t flags, void *_alstate, void *tx, uint64_t tx_id)
Flow *f, uint8_t flags, void *_alstate, void *tx, uint64_t tx_id)
{ {
SCEnter(); SCEnter();
DEBUG_VALIDATE_BUG_ON(f->alstate != _alstate); DEBUG_VALIDATE_BUG_ON(f->alstate != _alstate);
@ -231,7 +229,7 @@ int DetectFileInspectGeneric(ThreadVars *tv,
} }
int r = DETECT_ENGINE_INSPECT_SIG_NO_MATCH; int r = DETECT_ENGINE_INSPECT_SIG_NO_MATCH;
int match = DetectFileInspect(tv, det_ctx, f, s, smd, flags, ffc); int match = DetectFileInspect(det_ctx, f, s, smd, flags, ffc);
if (match == DETECT_ENGINE_INSPECT_SIG_MATCH) { if (match == DETECT_ENGINE_INSPECT_SIG_MATCH) {
r = DETECT_ENGINE_INSPECT_SIG_MATCH; r = DETECT_ENGINE_INSPECT_SIG_MATCH;
} else if (match == DETECT_ENGINE_INSPECT_SIG_CANT_MATCH) { } else if (match == DETECT_ENGINE_INSPECT_SIG_CANT_MATCH) {

Loading…
Cancel
Save