]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
bufq: simplify condition
authorDaniel Stenberg <daniel@haxx.se>
Mon, 18 Aug 2025 07:41:00 +0000 (09:41 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 18 Aug 2025 07:58:31 +0000 (09:58 +0200)
'result' is always CURLE_AGAIN here

Pointed out by CodeSonar

Closes #18305

lib/bufq.c

index 9919707b4c58c1f08878724a0f876cc7ba7c7f27..c97640a63c3646df471c1d1a16fdb652950e2f30 100644 (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;