From 1c1158a9dd2d2f89ba32f5c95461dd63a18e86ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Antoniak?= Date: Fri, 29 Jan 2021 09:20:17 +0100 Subject: transfer: fix GCC 10 warning with flag '-Wint-in-bool-context' ... and return the error code from the Curl_mime_rewind call. Closes #6537 --- lib/transfer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/transfer.c b/lib/transfer.c index c0e87f708..2f29b29d8 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 { -- cgit v1.2.1