From: MichaƂ Antoniak Date: Fri, 29 Jan 2021 08:20:17 +0000 (+0100) Subject: transfer: fix GCC 10 warning with flag '-Wint-in-bool-context' X-Git-Tag: curl-7_75_0~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c1158a9dd2d2f89ba32f5c95461dd63a18e86ad;p=thirdparty%2Fcurl.git transfer: fix GCC 10 warning with flag '-Wint-in-bool-context' ... and return the error code from the Curl_mime_rewind call. Closes #6537 --- diff --git a/lib/transfer.c b/lib/transfer.c index c0e87f708d..2f29b29d8e 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -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 {