From: Frederic Lecaille Date: Thu, 29 Oct 2026 13:28:28 +0000 (+0100) Subject: CLEANUP: quic: remove unused tx crypto size and offset counters X-Git-Tag: v3.5-dev11~72 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=32f94a38fa817307e33aae4d43974ca089d67de8;p=haproxy.git CLEANUP: quic: remove unused tx crypto size and offset counters The sz and offset members of the tx crypto substructure of quic_enc_level are written but never read: the buffered CRYPTO data are located with the bufs array and the sz member of each quic_crypto_buf. Let's remove them. --- diff --git a/include/haproxy/quic_tls-t.h b/include/haproxy/quic_tls-t.h index e42655330..52f07e88f 100644 --- a/include/haproxy/quic_tls-t.h +++ b/include/haproxy/quic_tls-t.h @@ -306,10 +306,6 @@ struct quic_enc_level { struct quic_crypto_buf **bufs; /* The number of element in use in the previous array. */ size_t nb_buf; - /* The total size of the CRYPTO data stored in the CRYPTO buffers. */ - size_t sz; - /* The offset of the CRYPT0 data stream. */ - uint64_t offset; } crypto; } tx; diff --git a/src/quic_ssl.c b/src/quic_ssl.c index 09fff51c8..3c2132692 100644 --- a/src/quic_ssl.c +++ b/src/quic_ssl.c @@ -96,7 +96,6 @@ static int qc_ssl_crypto_data_cpy(struct quic_conn *qc, struct quic_enc_level *q if (to_copy) { memcpy(pos, data, to_copy); /* Increment the total size of this CRYPTO buffers by . */ - qel->tx.crypto.sz += to_copy; (*qcb)->sz += to_copy; len -= to_copy; data += to_copy; diff --git a/src/quic_tls.c b/src/quic_tls.c index 0719b00b2..cab899165 100644 --- a/src/quic_tls.c +++ b/src/quic_tls.c @@ -234,8 +234,6 @@ static int quic_conn_enc_level_init(struct quic_conn *qc, qel->tx.crypto.bufs[0]->sz = 0; qel->tx.crypto.nb_buf = 1; - qel->tx.crypto.sz = 0; - qel->tx.crypto.offset = 0; /* No CRYPTO data for early data TLS encryption level */ if (level == ssl_encryption_early_data) qel->cstream = NULL;