From 294ebba56588754f226c8ab49e85dd457b5a1df4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 Aug 2025 09:41:00 +0200 Subject: [PATCH] bufq: simplify condition 'result' is always CURLE_AGAIN here Pointed out by CodeSonar Closes #18305 --- lib/bufq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bufq.c b/lib/bufq.c index 9919707b4c..c97640a63c 100644 --- a/lib/bufq.c +++ b/lib/bufq.c @@ -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; -- 2.47.3