From 3afe54ed5b78646a5bcbda17ac8475031578a806 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Wed, 23 Aug 2023 16:13:54 +0200 Subject: [PATCH] BUILD: quic: Compilation issue on 32-bits systems with quic_may_send_bytes() quic_may_send_bytes() implementation arrived with this commit: MINOR: quic: Amplification limit handling sanitization. It returns a size_t. So when compared with QUIC_MIN() with qc->path->mtu there is no need to cast this latted anymore because it is also a size_t. Detected when compiled with -m32 gcc option. --- src/quic_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quic_tx.c b/src/quic_tx.c index c414e2c..46dd6ba 100644 --- a/src/quic_tx.c +++ b/src/quic_tx.c @@ -504,7 +504,7 @@ static int qc_prep_app_pkts(struct quic_conn *qc, struct buffer *buf, end = pos + QUIC_MIN_CC_PKTSIZE; } else if (!quic_peer_validated_addr(qc) && qc_is_listener(qc)) { - end = pos + QUIC_MIN((uint64_t)qc->path->mtu, quic_may_send_bytes(qc)); + end = pos + QUIC_MIN(qc->path->mtu, quic_may_send_bytes(qc)); } else { end = pos + qc->path->mtu; @@ -1112,7 +1112,7 @@ int qc_prep_hpkts(struct quic_conn *qc, struct buffer *buf, struct list *qels) end = pos + QUIC_MIN_CC_PKTSIZE; } else if (!quic_peer_validated_addr(qc) && qc_is_listener(qc)) { - end = pos + QUIC_MIN((uint64_t)qc->path->mtu, quic_may_send_bytes(qc)); + end = pos + QUIC_MIN(qc->path->mtu, quic_may_send_bytes(qc)); } else { end = pos + qc->path->mtu; -- 1.7.10.4