From 77fb0a1e796e25ece0d7eeff926f08cdbbaff7f1 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 11 Jun 2025 19:10:41 +0200 Subject: [PATCH] packet: micro optimization in packet recycling --- src/packet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/packet.c b/src/packet.c index 8cde411b8e..80ecfb166d 100644 --- a/src/packet.c +++ b/src/packet.c @@ -126,9 +126,10 @@ void PacketReinit(Packet *p) p->alerts.discarded = 0; p->alerts.suppressed = 0; p->alerts.drop.action = 0; - if (p->alerts.cnt > 0) + if (p->alerts.cnt > 0) { PacketAlertRecycle(p->alerts.alerts, p->alerts.cnt); - p->alerts.cnt = 0; + p->alerts.cnt = 0; + } p->pcap_cnt = 0; p->tunnel_rtv_cnt = 0; p->tunnel_tpr_cnt = 0; -- 2.47.2