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