From e5010d77044a65fb298e47c0b5aa3b19d3461a4f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 4 Nov 2019 11:20:40 +0100 Subject: [PATCH] detect: inject packet cleanup --- src/detect-engine.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/detect-engine.c b/src/detect-engine.c index f1fca6235c..5fd954f8f0 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -1724,10 +1724,9 @@ static void InjectPackets(ThreadVars **detect_tvs, DetectEngineThreadCtx **new_det_ctx, int no_of_detect_tvs) { - int i; /* inject a fake packet if the detect thread isn't using the new ctx yet, * this speeds up the process */ - for (i = 0; i < no_of_detect_tvs; i++) { + for (int i = 0; i < no_of_detect_tvs; i++) { if (SC_ATOMIC_GET(new_det_ctx[i]->so_far_used_by_detect) != 1) { if (detect_tvs[i]->inq != NULL) { Packet *p = PacketGetFromAlloc(); -- 2.47.2