From: Frederic Lecaille Date: Wed, 4 Nov 2026 17:00:02 +0000 (+0100) Subject: CLEANUP: quic: drop the intermediate packet tree pointer in the fast retransmissions X-Git-Url: https://git.kaiwu.me/$%7BGITURL%7D$%7Bcid%7D?a=commitdiff_plain;h=d50ee1b8cf4bc1cf2b7ed873e712bce01cdefef1;p=haproxy.git CLEANUP: quic: drop the intermediate packet tree pointer in the fast retransmissions In qc_prep_fast_retrans() and qc_prep_hdshk_fast_retrans(), the local pointer is assigned once and then only used once, as argument of eb64_first(). Dereference the packet number space tree directly instead, which removes five lines without changing the behaviour. No functional change, no need to backport. --- diff --git a/src/quic_retransmit.c b/src/quic_retransmit.c index 93d9ae614..30ba6d60d 100644 --- a/src/quic_retransmit.c +++ b/src/quic_retransmit.c @@ -139,7 +139,6 @@ void qc_prep_fast_retrans(struct quic_conn *qc, struct quic_pktns *pktns, struct list *frms1, struct list *frms2) { - struct eb_root *pkts = &pktns->tx.pkts; struct list *frms = frms1; struct eb64_node *node; struct quic_tx_packet *pkt; @@ -153,7 +152,7 @@ void qc_prep_fast_retrans(struct quic_conn *qc, * again into so that a second probe datagram is sent. */ pkt = NULL; - node = eb64_first(pkts); + node = eb64_first(&pktns->tx.pkts); start: while (node) { struct quic_tx_packet *p; @@ -209,7 +208,6 @@ void qc_prep_hdshk_fast_retrans(struct quic_conn *qc, struct quic_enc_level *iqel = qc->iel; struct quic_enc_level *hqel = qc->hel; - struct eb_root *pkts; struct eb64_node *node; struct quic_tx_packet *pkt; struct list *tmp = &itmp; @@ -217,8 +215,7 @@ void qc_prep_hdshk_fast_retrans(struct quic_conn *qc, TRACE_ENTER(QUIC_EV_CONN_SPPKTS, qc); pkt = NULL; - pkts = &iqel->pktns->tx.pkts; - node = eb64_first(pkts); + node = eb64_first(&iqel->pktns->tx.pkts); /* Skip the empty packet (they have already been retransmitted) */ while (node) { struct quic_tx_packet *p;