1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 06:25:03 -05:00

transfer: fix GCC 10 warning with flag '-Wint-in-bool-context'

... and return the error code from the Curl_mime_rewind call.

Closes #6537
This commit is contained in:
Michał Antoniak 2021-01-29 09:20:17 +01:00 committed by Daniel Stenberg
parent 0cf5670c54
commit 1c1158a9dd
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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 {