lib670: avoid double check result

Closes #8660
This commit is contained in:
Leandro Coutinho 2022-03-31 14:27:10 +02:00 committed by Daniel Stenberg
parent 34ebf3f90d
commit b54e18640e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -140,10 +140,6 @@ int test(char *URL)
mime = curl_mime_init(pooh.easy);
part = curl_mime_addpart(mime);
result = curl_mime_name(part, name);
if(!result)
res = curl_mime_data_cb(part, (curl_off_t) 2, read_callback,
NULL, NULL, &pooh);
if(result) {
fprintf(stderr,
"Something went wrong when building the mime structure: %d\n",
@ -151,6 +147,9 @@ int test(char *URL)
goto test_cleanup;
}
res = curl_mime_data_cb(part, (curl_off_t) 2, read_callback,
NULL, NULL, &pooh);
/* Bind mime data to its easy handle. */
if(!res)
test_setopt(pooh.easy, CURLOPT_MIMEPOST, mime);