tests: rename CURLMcode variables to mresult

This commit is contained in:
Daniel Stenberg 2025-12-16 13:40:02 +01:00
parent 0a26e3a660
commit 56f600ec23
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
255 changed files with 1771 additions and 1772 deletions

View file

@ -85,7 +85,7 @@ static void usage_upload_pausing(const char *msg)
static CURLcode test_cli_upload_pausing(const char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_OK;
CURLcode result = CURLE_OK;
CURLU *cu;
struct curl_slist *resolve = NULL;
char resolve_buf[1024];
@ -135,22 +135,22 @@ static CURLcode test_cli_upload_pausing(const char *URL)
cu = curl_url();
if(!cu) {
curl_mfprintf(stderr, "out of memory\n");
res = (CURLcode)1;
result = (CURLcode)1;
goto cleanup;
}
if(curl_url_set(cu, CURLUPART_URL, url, 0)) {
curl_mfprintf(stderr, "not a URL: '%s'\n", url);
res = (CURLcode)1;
result = (CURLcode)1;
goto cleanup;
}
if(curl_url_get(cu, CURLUPART_HOST, &host, 0)) {
curl_mfprintf(stderr, "could not get host of '%s'\n", url);
res = (CURLcode)1;
result = (CURLcode)1;
goto cleanup;
}
if(curl_url_get(cu, CURLUPART_PORT, &port, 0)) {
curl_mfprintf(stderr, "could not get port of '%s'\n", url);
res = (CURLcode)1;
result = (CURLcode)1;
goto cleanup;
}
memset(&resolve, 0, sizeof(resolve));
@ -161,7 +161,7 @@ static CURLcode test_cli_upload_pausing(const char *URL)
curl = curl_easy_init();
if(!curl) {
curl_mfprintf(stderr, "out of memory\n");
res = (CURLcode)1;
result = (CURLcode)1;
goto cleanup;
}
/* We want to use our own read function. */
@ -189,14 +189,14 @@ static CURLcode test_cli_upload_pausing(const char *URL)
curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, cli_debug_cb) != CURLE_OK ||
curl_easy_setopt(curl, CURLOPT_RESOLVE, resolve) != CURLE_OK) {
curl_mfprintf(stderr, "something unexpected went wrong - bailing out!\n");
res = (CURLcode)2;
result = (CURLcode)2;
goto cleanup;
}
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, http_version);
res = curl_easy_perform(curl);
result = curl_easy_perform(curl);
cleanup:
@ -209,5 +209,5 @@ cleanup:
curl_url_cleanup(cu);
curl_global_cleanup();
return res;
return result;
}