mirror of
https://github.com/curl/curl.git
synced 2026-05-30 13:17:28 +03:00
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
This commit is contained in:
parent
3f041a3852
commit
5bdcaa76d1
1 changed files with 1 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue