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.
This commit is contained in:
Frédéric Lécaille 2023-08-23 16:13:54 +02:00
parent 86854dd032
commit 3afe54ed5b

View File

@ -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;