]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
transfer: fix GCC 10 warning with flag '-Wint-in-bool-context'
authorMichał Antoniak <m.antoniak@posnet.com.pl>
Fri, 29 Jan 2021 08:20:17 +0000 (09:20 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 29 Jan 2021 13:47:28 +0000 (14:47 +0100)
... and return the error code from the Curl_mime_rewind call.

Closes #6537

lib/transfer.c

index c0e87f708d91b18121f5a3dd5ead698813abcd2e..2f29b29d8e635cb26574b33afc817d2908498aae 100644 (file)
@@ -435,9 +435,10 @@ CURLcode Curl_readrewind(struct Curl_easy *data)
     ; /* do nothing */
   else if(data->state.httpreq == HTTPREQ_POST_MIME ||
           data->state.httpreq == HTTPREQ_POST_FORM) {
-    if(Curl_mime_rewind(mimepart) != CURLE_OK) {
+    CURLcode result = Curl_mime_rewind(mimepart);
+    if(result) {
       failf(data, "Cannot rewind mime/post data");
-      return CURLE_SEND_FAIL_REWIND;
+      return result;
     }
   }
   else {