From: Daniel Stenberg Date: Sun, 22 Dec 2024 23:01:12 +0000 (+0100) Subject: vquic: make vquic_send_packets not return without setting psent X-Git-Tag: curl-8_12_0~285 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bdcaa76d1c68aa73b7190ee7af165225248beac;p=thirdparty%2Fcurl.git vquic: make vquic_send_packets not return without setting psent This is debug code, but since the caller might use the value even when this function returns error, it needs to be cleared properly here. Spotted by Clang-tidy Closes #15807 --- diff --git a/lib/vquic/vquic.c b/lib/vquic/vquic.c index 41a2cc9757..0970891580 100644 --- a/lib/vquic/vquic.c +++ b/lib/vquic/vquic.c @@ -248,6 +248,7 @@ static CURLcode vquic_send_packets(struct Curl_cfilter *cf, /* simulate network blocking/partial writes */ if(qctx->wblock_percent > 0) { unsigned char c; + *psent = 0; Curl_rand(data, &c, 1); if(c >= ((100-qctx->wblock_percent)*256/100)) { CURL_TRC_CF(data, cf, "vquic_flush() simulate EWOULDBLOCK");