From: Frederic Lecaille Date: Wed, 4 Nov 2026 16:34:40 +0000 (+0100) Subject: CLEANUP: quic: remove a redundant test in the fast retransmission lookups X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=bda1c85bb5850fa2ca8ed428b08aeda2a0c65d31;p=haproxy.git CLEANUP: quic: remove a redundant test in the fast retransmission lookups qc_pkt_with_only_acked_frms() returns 1 for a packet without any frame, since its loop is not entered and it falls back on the final return 1. The LIST_ISEMPTY(&pkt->frms) test combined with it is therefore redundant, both in qc_prep_fast_retrans() and in qc_prep_hdshk_fast_retrans(). No functional change, no need to backport. --- diff --git a/src/quic_retransmit.c b/src/quic_retransmit.c index a96767dc5..b95095279 100644 --- a/src/quic_retransmit.c +++ b/src/quic_retransmit.c @@ -167,7 +167,7 @@ void qc_prep_fast_retrans(struct quic_conn *qc, "--> pn=%llu (%d %d %d)", (ull)p->pn_node.key, LIST_ISEMPTY(&p->frms), !!(p->flags & QUIC_FL_TX_PACKET_COALESCED), qc_pkt_with_only_acked_frms(p)); - if (!LIST_ISEMPTY(&p->frms) && !qc_pkt_with_only_acked_frms(p)) { + if (!qc_pkt_with_only_acked_frms(p)) { pkt = p; break; } @@ -228,7 +228,7 @@ void qc_prep_hdshk_fast_retrans(struct quic_conn *qc, TRACE_PRINTF(TRACE_LEVEL_PROTO, QUIC_EV_CONN_SPPKTS, qc, 0, 0, 0, "--> pn=%llu (%d %d)", (ull)p->pn_node.key, LIST_ISEMPTY(&p->frms), !!(p->flags & QUIC_FL_TX_PACKET_COALESCED)); - if (!LIST_ISEMPTY(&p->frms) && !(p->flags & QUIC_FL_TX_PACKET_COALESCED) && + if (!(p->flags & QUIC_FL_TX_PACKET_COALESCED) && !qc_pkt_with_only_acked_frms(p)) { pkt = p; break;