diff options
author | MichaĆ Antoniak <m.antoniak@posnet.com.pl> | 2021-01-29 09:20:17 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-01-29 14:47:28 +0100 |
commit | 1c1158a9dd2d2f89ba32f5c95461dd63a18e86ad (patch) | |
tree | 9078eb57a81676c25c8133f060d6c23078a0c576 | |
parent | 0cf5670c54bc6f94cea714d71bacab234ea23c51 (diff) | |
download | curl-1c1158a9dd2d2f89ba32f5c95461dd63a18e86ad.tar.gz |
transfer: fix GCC 10 warning with flag '-Wint-in-bool-context'
... and return the error code from the Curl_mime_rewind call.
Closes #6537
-rw-r--r-- | lib/transfer.c | 5 |
1 files 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 { |