bufq: simplify condition

'result' is always CURLE_AGAIN here

Pointed out by CodeSonar

Closes #18305
This commit is contained in:
Daniel Stenberg 2025-08-18 09:41:00 +02:00
parent e440686034
commit 294ebba565
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -537,7 +537,8 @@ CURLcode Curl_bufq_write_pass(struct bufq *q,
if(result != CURLE_AGAIN)
/* real error, fail */
return result;
if((result == CURLE_AGAIN) && *pwritten)
/* result == CURLE_AGAIN */
if(*pwritten)
/* we did write successfully before */
result = CURLE_OK;
return result;