From 5bdcaa76d1c68aa73b7190ee7af165225248beac Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 23 Dec 2024 00:01:12 +0100 Subject: [PATCH] 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 --- lib/vquic/vquic.c | 1 + 1 file changed, 1 insertion(+) 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"); -- 2.47.3