tests: rename CURLMcode variables to mresult
No binary (build failed)
—
(log yok)
| @@ -45,7 +45,7 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER | |
| </strippart> | |
| <stdout> | |
| - | res 0 |
| + | result 0 |
| status 302 | |
| redirects 0 | |
| effectiveurl http://%HOSTIP:%HTTPPORT/%TESTNUMBER | |
| @@ -45,7 +45,7 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER | |
| </strippart> | |
| <stdout> | |
| - | res 0 |
| + | result 0 |
| status 302 | |
| redirects 0 | |
| effectiveurl http://%HOSTIP:%HTTPPORT/%TESTNUMBER | |
| @@ -61,7 +61,7 @@ Accept: */* | |
| </protocol> | |
| <stdout> | |
| - | res 0 |
| + | result 0 |
| status 200 | |
| redirects 1 | |
| effectiveurl http://%HOSTIP:%HTTPPORT/%20/with/%20space/%TESTNUMBER0002 | |
| @@ -86,7 +86,7 @@ static CURLcode test_cli_h2_pausing(const char *URL) | |
| size_t i; | |
| CURLMsg *msg; | |
| int rounds = 0; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLU *cu; | |
| struct curl_slist *resolve = NULL; | |
| char resolve_buf[1024]; | |
| @@ -143,22 +143,22 @@ static CURLcode test_cli_h2_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)); | |
| @@ -190,7 +190,7 @@ static CURLcode test_cli_h2_pausing(const char *URL) | |
| curl_easy_setopt(handles[i].curl, CURLOPT_PIPEWAIT, 1L) != CURLE_OK || | |
| curl_easy_setopt(handles[i].curl, CURLOPT_URL, url) != CURLE_OK) { | |
| curl_mfprintf(stderr, "failed configuring easy handle - bailing out\n"); | |
| - | res = (CURLcode)2; |
| + | result = (CURLcode)2; |
| goto cleanup; | |
| } | |
| curl_easy_setopt(handles[i].curl, CURLOPT_HTTP_VERSION, http_version); | |
| @@ -199,14 +199,14 @@ static CURLcode test_cli_h2_pausing(const char *URL) | |
| multi = curl_multi_init(); | |
| if(!multi) { | |
| curl_mfprintf(stderr, "curl_multi_init() failed - bailing out\n"); | |
| - | res = (CURLcode)2; |
| + | result = (CURLcode)2; |
| goto cleanup; | |
| } | |
| for(i = 0; i < CURL_ARRAYSIZE(handles); i++) { | |
| if(curl_multi_add_handle(multi, handles[i].curl) != CURLM_OK) { | |
| curl_mfprintf(stderr, "curl_multi_add_handle() failed - bailing out\n"); | |
| - | res = (CURLcode)2; |
| + | result = (CURLcode)2; |
| goto cleanup; | |
| } | |
| } | |
| @@ -215,7 +215,7 @@ static CURLcode test_cli_h2_pausing(const char *URL) | |
| curl_mfprintf(stderr, "INFO: multi_perform round %d\n", rounds); | |
| if(curl_multi_perform(multi, &still_running) != CURLM_OK) { | |
| curl_mfprintf(stderr, "curl_multi_perform() failed - bailing out\n"); | |
| - | res = (CURLcode)2; |
| + | result = (CURLcode)2; |
| goto cleanup; | |
| } | |
| @@ -245,14 +245,14 @@ static CURLcode test_cli_h2_pausing(const char *URL) | |
| if(!as_expected) { | |
| curl_mfprintf(stderr, "ERROR: handles not in expected state " | |
| "after %d rounds\n", rounds); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| } | |
| break; | |
| } | |
| if(curl_multi_poll(multi, NULL, 0, 100, &numfds) != CURLM_OK) { | |
| curl_mfprintf(stderr, "curl_multi_poll() failed - bailing out\n"); | |
| - | res = (CURLcode)2; |
| + | result = (CURLcode)2; |
| goto cleanup; | |
| } | |
| @@ -266,7 +266,7 @@ static CURLcode test_cli_h2_pausing(const char *URL) | |
| "resumed=%d, result %d - wtf?\n", i, | |
| handles[i].paused, | |
| handles[i].resumed, msg->data.result); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| } | |
| @@ -312,5 +312,5 @@ cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -108,7 +108,7 @@ static CURLcode test_cli_h2_serverpush(const char *URL) | |
| CURL *curl = NULL; | |
| CURLM *multi; | |
| int transfers = 1; /* we start with one */ | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| debug_config.nohex = TRUE; | |
| debug_config.tracetime = FALSE; | |
| @@ -125,19 +125,19 @@ static CURLcode test_cli_h2_serverpush(const char *URL) | |
| multi = curl_multi_init(); | |
| if(!multi) { | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| if(setup_h2_serverpush(curl, URL)) { | |
| curl_mfprintf(stderr, "failed\n"); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| @@ -150,13 +150,13 @@ static CURLcode test_cli_h2_serverpush(const char *URL) | |
| do { | |
| struct CURLMsg *m; | |
| int still_running; /* keep number of running handles */ | |
| - | CURLMcode mc = curl_multi_perform(multi, &still_running); |
| + | CURLMcode mresult = curl_multi_perform(multi, &still_running); |
| if(still_running) | |
| /* wait for activity, timeout or "nothing" */ | |
| - | mc = curl_multi_poll(multi, NULL, 0, 1000, NULL); |
| + | mresult = curl_multi_poll(multi, NULL, 0, 1000, NULL); |
| - | if(mc) |
| + | if(mresult) |
| break; | |
| /* | |
| @@ -188,5 +188,5 @@ cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -37,12 +37,12 @@ static CURLcode test_cli_h2_upgrade_extreme(const char *URL) | |
| { | |
| CURLM *multi = NULL; | |
| CURL *curl; | |
| - | CURLMcode mc; |
| + | CURLMcode mresult; |
| int running_handles = 0, start_count, numfds; | |
| CURLMsg *msg; | |
| int msgs_in_queue; | |
| char range[128]; | |
| - | CURLcode res = (CURLcode)1; |
| + | CURLcode result = (CURLcode)1; |
| if(!URL) { | |
| curl_mfprintf(stderr, "need URL as argument\n"); | |
| @@ -85,28 +85,28 @@ static CURLcode test_cli_h2_upgrade_extreme(const char *URL) | |
| (curl_off_t)16384); | |
| curl_easy_setopt(curl, CURLOPT_RANGE, range); | |
| - | mc = curl_multi_add_handle(multi, curl); |
| - | if(mc != CURLM_OK) { |
| + | mresult = curl_multi_add_handle(multi, curl); |
| + | if(mresult != CURLM_OK) { |
| curl_mfprintf(stderr, "curl_multi_add_handle: %s\n", | |
| - | curl_multi_strerror(mc)); |
| + | curl_multi_strerror(mresult)); |
| curl_easy_cleanup(curl); | |
| goto cleanup; | |
| } | |
| --start_count; | |
| } | |
| - | mc = curl_multi_perform(multi, &running_handles); |
| - | if(mc != CURLM_OK) { |
| + | mresult = curl_multi_perform(multi, &running_handles); |
| + | if(mresult != CURLM_OK) { |
| curl_mfprintf(stderr, "curl_multi_perform: %s\n", | |
| - | curl_multi_strerror(mc)); |
| + | curl_multi_strerror(mresult)); |
| goto cleanup; | |
| } | |
| if(running_handles) { | |
| - | mc = curl_multi_poll(multi, NULL, 0, 1000000, &numfds); |
| - | if(mc != CURLM_OK) { |
| + | mresult = curl_multi_poll(multi, NULL, 0, 1000000, &numfds); |
| + | if(mresult != CURLM_OK) { |
| curl_mfprintf(stderr, "curl_multi_poll: %s\n", | |
| - | curl_multi_strerror(mc)); |
| + | curl_multi_strerror(mresult)); |
| goto cleanup; | |
| } | |
| } | |
| @@ -148,7 +148,7 @@ static CURLcode test_cli_h2_upgrade_extreme(const char *URL) | |
| } while(running_handles > 0 || start_count); | |
| curl_mfprintf(stderr, "exiting\n"); | |
| - | res = CURLE_OK; |
| + | result = CURLE_OK; |
| cleanup: | |
| @@ -167,5 +167,5 @@ cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -59,7 +59,7 @@ struct transfer_d { | |
| int resumed; | |
| int done; | |
| int checked_ssl; | |
| - | CURLcode res; |
| + | CURLcode result; |
| }; | |
| static size_t transfer_count_d = 1; | |
| @@ -136,13 +136,13 @@ static int my_progress_d_cb(void *userdata, | |
| defined(USE_GNUTLS) || defined(USE_MBEDTLS) || defined(USE_RUSTLS) | |
| if(!t->checked_ssl && dlnow > 0) { | |
| struct curl_tlssessioninfo *tls; | |
| - | CURLcode res; |
| + | CURLcode result; |
| t->checked_ssl = TRUE; | |
| - | res = curl_easy_getinfo(t->curl, CURLINFO_TLS_SSL_PTR, &tls); |
| - | if(res) { |
| + | result = curl_easy_getinfo(t->curl, CURLINFO_TLS_SSL_PTR, &tls); |
| + | if(result) { |
| curl_mfprintf(stderr, "[t-%zu] info CURLINFO_TLS_SSL_PTR failed: %d\n", | |
| - | t->idx, res); |
| + | t->idx, result); |
| assert(0); | |
| } | |
| else { | |
| @@ -292,7 +292,7 @@ static CURLcode test_cli_hx_download(const char *URL) | |
| size_t max_host_conns = 0; | |
| size_t max_total_conns = 0; | |
| int fresh_connect = 0; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| (void)URL; | |
| @@ -303,7 +303,7 @@ static CURLcode test_cli_hx_download(const char *URL) | |
| switch(ch) { | |
| case 'h': | |
| usage_hx_download(NULL); | |
| - | res = (CURLcode)2; |
| + | result = (CURLcode)2; |
| goto optcleanup; | |
| case 'a': | |
| abort_paused = 1; | |
| @@ -358,14 +358,14 @@ static CURLcode test_cli_hx_download(const char *URL) | |
| http_version = CURL_HTTP_VERSION_3ONLY; | |
| else { | |
| usage_hx_download("invalid http version"); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto optcleanup; | |
| } | |
| break; | |
| } | |
| default: | |
| usage_hx_download("invalid option"); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto optcleanup; | |
| } | |
| } | |
| @@ -376,14 +376,14 @@ static CURLcode test_cli_hx_download(const char *URL) | |
| if(test_argc != 1) { | |
| usage_hx_download("not enough arguments"); | |
| - | res = (CURLcode)2; |
| + | result = (CURLcode)2; |
| goto optcleanup; | |
| } | |
| url = test_argv[0]; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| - | res = (CURLcode)3; |
| + | result = (CURLcode)3; |
| goto optcleanup; | |
| } | |
| @@ -393,7 +393,7 @@ static CURLcode test_cli_hx_download(const char *URL) | |
| share = curl_share_init(); | |
| if(!share) { | |
| curl_mfprintf(stderr, "error allocating share\n"); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE); | |
| @@ -406,7 +406,7 @@ static CURLcode test_cli_hx_download(const char *URL) | |
| transfer_d = curlx_calloc(transfer_count_d, sizeof(*transfer_d)); | |
| if(!transfer_d) { | |
| curl_mfprintf(stderr, "error allocating transfer structs\n"); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| @@ -434,7 +434,7 @@ static CURLcode test_cli_hx_download(const char *URL) | |
| setup_hx_download(t->curl, url, t, http_version, host, share, | |
| use_earlydata, fresh_connect)) { | |
| curl_mfprintf(stderr, "[t-%zu] FAILED setup\n", i); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| curl_multi_add_handle(multi, t->curl); | |
| @@ -445,14 +445,14 @@ static CURLcode test_cli_hx_download(const char *URL) | |
| do { | |
| int still_running; /* keep number of running handles */ | |
| - | CURLMcode mc = curl_multi_perform(multi, &still_running); |
| + | CURLMcode mresult = curl_multi_perform(multi, &still_running); |
| if(still_running) { | |
| /* wait for activity, timeout or "nothing" */ | |
| - | mc = curl_multi_poll(multi, NULL, 0, 500, NULL); |
| + | mresult = curl_multi_poll(multi, NULL, 0, 500, NULL); |
| } | |
| - | if(mc) |
| + | if(mresult) |
| break; | |
| do { | |
| @@ -465,9 +465,9 @@ static CURLcode test_cli_hx_download(const char *URL) | |
| t = get_transfer_for_easy_d(easy); | |
| if(t) { | |
| t->done = 1; | |
| - | t->res = m->data.result; |
| + | t->result = m->data.result; |
| curl_mfprintf(stderr, "[t-%zu] FINISHED with result %d\n", | |
| - | t->idx, t->res); |
| + | t->idx, t->result); |
| if(use_earlydata) { | |
| curl_off_t sent; | |
| curl_easy_getinfo(easy, CURLINFO_EARLYDATA_SENT_T, &sent); | |
| @@ -517,7 +517,7 @@ static CURLcode test_cli_hx_download(const char *URL) | |
| setup_hx_download(t->curl, url, t, http_version, host, share, | |
| use_earlydata, fresh_connect)) { | |
| curl_mfprintf(stderr, "[t-%zu] FAILED setup\n", i); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| curl_multi_add_handle(multi, t->curl); | |
| @@ -550,8 +550,8 @@ cleanup: | |
| curl_easy_cleanup(t->curl); | |
| t->curl = NULL; | |
| } | |
| - | if(t->res) |
| - | res = t->res; |
| + | if(t->result) |
| + | result = t->result; |
| else /* on success we expect ssl to have been checked */ | |
| assert(t->checked_ssl); | |
| } | |
| @@ -567,5 +567,5 @@ optcleanup: | |
| curlx_free(resolve); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -245,7 +245,7 @@ static CURLcode test_cli_hx_upload(const char *URL) | |
| struct curl_slist *host = NULL; | |
| const char *resolve = NULL; | |
| int ch; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| (void)URL; | |
| @@ -347,7 +347,7 @@ static CURLcode test_cli_hx_upload(const char *URL) | |
| share = curl_share_init(); | |
| if(!share) { | |
| curl_mfprintf(stderr, "error allocating share\n"); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE); | |
| @@ -360,7 +360,7 @@ static CURLcode test_cli_hx_upload(const char *URL) | |
| transfer_u = curlx_calloc(transfer_count_u, sizeof(*transfer_u)); | |
| if(!transfer_u) { | |
| curl_mfprintf(stderr, "error allocating transfer structs\n"); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| @@ -379,7 +379,7 @@ static CURLcode test_cli_hx_upload(const char *URL) | |
| CURL *curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "failed to init easy handle\n"); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| for(i = 0; i < transfer_count_u; ++i) { | |
| @@ -389,7 +389,7 @@ static CURLcode test_cli_hx_upload(const char *URL) | |
| if(setup_hx_upload(t->curl, url, t, http_version, host, share, | |
| use_earlydata, announce_length)) { | |
| curl_mfprintf(stderr, "[t-%zu] FAILED setup\n", i); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| @@ -412,7 +412,7 @@ static CURLcode test_cli_hx_upload(const char *URL) | |
| if(!t->curl || setup_hx_upload(t->curl, url, t, http_version, host, | |
| share, use_earlydata, announce_length)) { | |
| curl_mfprintf(stderr, "[t-%zu] FAILED setup\n", i); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| curl_multi_add_handle(multi, t->curl); | |
| @@ -423,15 +423,15 @@ static CURLcode test_cli_hx_upload(const char *URL) | |
| do { | |
| int still_running; /* keep number of running handles */ | |
| - | CURLMcode mc = curl_multi_perform(multi, &still_running); |
| + | CURLMcode mresult = curl_multi_perform(multi, &still_running); |
| struct CURLMsg *m; | |
| if(still_running) { | |
| /* wait for activity, timeout or "nothing" */ | |
| - | mc = curl_multi_poll(multi, NULL, 0, 1000, NULL); |
| + | mresult = curl_multi_poll(multi, NULL, 0, 1000, NULL); |
| } | |
| - | if(mc) |
| + | if(mresult) |
| break; | |
| do { | |
| @@ -498,7 +498,7 @@ static CURLcode test_cli_hx_upload(const char *URL) | |
| host, share, use_earlydata, | |
| announce_length)) { | |
| curl_mfprintf(stderr, "[t-%zu] FAILED setup\n", i); | |
| - | res = (CURLcode)1; |
| + | result = (CURLcode)1; |
| goto cleanup; | |
| } | |
| curl_multi_add_handle(multi, t->curl); | |
| @@ -544,5 +544,5 @@ cleanup: | |
| curl_slist_free_all(host); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -61,7 +61,7 @@ static CURL *tse_add_transfer(CURLM *multi, CURLSH *share, | |
| const char *url, long http_version) | |
| { | |
| CURL *curl; | |
| - | CURLMcode mc; |
| + | CURLMcode mresult; |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| @@ -83,10 +83,10 @@ static CURL *tse_add_transfer(CURLM *multi, CURLSH *share, | |
| if(resolve) | |
| curl_easy_setopt(curl, CURLOPT_RESOLVE, resolve); | |
| - | mc = curl_multi_add_handle(multi, curl); |
| - | if(mc != CURLM_OK) { |
| + | mresult = curl_multi_add_handle(multi, curl); |
| + | if(mresult != CURLM_OK) { |
| curl_mfprintf(stderr, "curl_multi_add_handle: %s\n", | |
| - | curl_multi_strerror(mc)); |
| + | curl_multi_strerror(mresult)); |
| curl_easy_cleanup(curl); | |
| return NULL; | |
| } | |
| @@ -96,7 +96,7 @@ static CURL *tse_add_transfer(CURLM *multi, CURLSH *share, | |
| static CURLcode test_cli_tls_session_reuse(const char *URL) | |
| { | |
| CURLM *multi = NULL; | |
| - | CURLMcode mc; |
| + | CURLMcode mresult; |
| int running_handles = 0, numfds; | |
| CURLMsg *msg; | |
| CURLSH *share = NULL; | |
| @@ -107,7 +107,7 @@ static CURLcode test_cli_tls_session_reuse(const char *URL) | |
| int add_more, waits, ongoing = 0; | |
| char *host = NULL, *port = NULL; | |
| long http_version = CURL_HTTP_VERSION_1_1; | |
| - | CURLcode res = (CURLcode)1; |
| + | CURLcode result = (CURLcode)1; |
| if(!URL || !libtest_arg2) { | |
| curl_mfprintf(stderr, "need args: URL proto\n"); | |
| @@ -127,7 +127,7 @@ static CURLcode test_cli_tls_session_reuse(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)) { | |
| @@ -166,18 +166,18 @@ static CURLcode test_cli_tls_session_reuse(const char *URL) | |
| add_more = 6; | |
| waits = 3; | |
| do { | |
| - | mc = curl_multi_perform(multi, &running_handles); |
| - | if(mc != CURLM_OK) { |
| + | mresult = curl_multi_perform(multi, &running_handles); |
| + | if(mresult != CURLM_OK) { |
| curl_mfprintf(stderr, "curl_multi_perform: %s\n", | |
| - | curl_multi_strerror(mc)); |
| + | curl_multi_strerror(mresult)); |
| goto cleanup; | |
| } | |
| if(running_handles) { | |
| - | mc = curl_multi_poll(multi, NULL, 0, 1000000, &numfds); |
| - | if(mc != CURLM_OK) { |
| + | mresult = curl_multi_poll(multi, NULL, 0, 1000000, &numfds); |
| + | if(mresult != CURLM_OK) { |
| curl_mfprintf(stderr, "curl_multi_poll: %s\n", | |
| - | curl_multi_strerror(mc)); |
| + | curl_multi_strerror(mresult)); |
| goto cleanup; | |
| } | |
| } | |
| @@ -233,12 +233,12 @@ static CURLcode test_cli_tls_session_reuse(const char *URL) | |
| if(!tse_found_tls_session) { | |
| curl_mfprintf(stderr, "CURLINFO_TLS_SSL_PTR not found during run\n"); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto cleanup; | |
| } | |
| curl_mfprintf(stderr, "exiting\n"); | |
| - | res = CURLE_OK; |
| + | result = CURLE_OK; |
| cleanup: | |
| @@ -262,5 +262,5 @@ cleanup: | |
| curl_url_cleanup(cu); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -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; |
| } | |
| @@ -285,7 +285,7 @@ static CURLcode test_ws_data_m1_echo(const char *url, | |
| size_t plen_max) | |
| { | |
| CURLM *multi = NULL; | |
| - | CURLcode r = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct test_ws_m1_ctx m1_ctx; | |
| size_t i, len; | |
| @@ -295,7 +295,7 @@ static CURLcode test_ws_data_m1_echo(const char *url, | |
| m1_ctx.send_buf = curlx_calloc(1, plen_max + 1); | |
| m1_ctx.recv_buf = curlx_calloc(1, plen_max + 1); | |
| if(!m1_ctx.send_buf || !m1_ctx.recv_buf) { | |
| - | r = CURLE_OUT_OF_MEMORY; |
| + | result = CURLE_OUT_OF_MEMORY; |
| goto out; | |
| } | |
| for(i = 0; i < plen_max; ++i) { | |
| @@ -304,13 +304,13 @@ static CURLcode test_ws_data_m1_echo(const char *url, | |
| multi = curl_multi_init(); | |
| if(!multi) { | |
| - | r = CURLE_OUT_OF_MEMORY; |
| + | result = CURLE_OUT_OF_MEMORY; |
| goto out; | |
| } | |
| m1_ctx.curl = curl_easy_init(); | |
| if(!m1_ctx.curl) { | |
| - | r = CURLE_OUT_OF_MEMORY; |
| + | result = CURLE_OUT_OF_MEMORY; |
| goto out; | |
| } | |
| @@ -347,18 +347,18 @@ static CURLcode test_ws_data_m1_echo(const char *url, | |
| while(1) { | |
| int still_running; /* keep number of running handles */ | |
| - | CURLMcode mc = curl_multi_perform(multi, &still_running); |
| + | CURLMcode mresult = curl_multi_perform(multi, &still_running); |
| if(!still_running || (m1_ctx.frames_written >= m1_ctx.nframes)) { | |
| /* got the full echo back or failed */ | |
| break; | |
| } | |
| - | if(!mc && still_running) { |
| - | mc = curl_multi_poll(multi, NULL, 0, 1, NULL); |
| + | if(!mresult && still_running) { |
| + | mresult = curl_multi_poll(multi, NULL, 0, 1, NULL); |
| } | |
| - | if(mc) { |
| - | r = CURLE_RECV_ERROR; |
| + | if(mresult) { |
| + | result = CURLE_RECV_ERROR; |
| goto out; | |
| } | |
| } | |
| @@ -369,13 +369,13 @@ static CURLcode test_ws_data_m1_echo(const char *url, | |
| if(m1_ctx.frames_read < m1_ctx.nframes) { | |
| curl_mfprintf(stderr, "m1_echo, sent only %d/%d frames\n", | |
| m1_ctx.frames_read, m1_ctx.nframes); | |
| - | r = CURLE_SEND_ERROR; |
| + | result = CURLE_SEND_ERROR; |
| goto out; | |
| } | |
| if(m1_ctx.frames_written < m1_ctx.frames_read) { | |
| curl_mfprintf(stderr, "m1_echo, received only %d/%d frames\n", | |
| m1_ctx.frames_written, m1_ctx.frames_read); | |
| - | r = CURLE_RECV_ERROR; |
| + | result = CURLE_RECV_ERROR; |
| goto out; | |
| } | |
| } | |
| @@ -388,7 +388,7 @@ out: | |
| } | |
| curlx_free(m1_ctx.send_buf); | |
| curlx_free(m1_ctx.recv_buf); | |
| - | return r; |
| + | return result; |
| } | |
| static void test_ws_data_usage(const char *msg) | |
| @@ -407,7 +407,7 @@ static void test_ws_data_usage(const char *msg) | |
| static CURLcode test_cli_ws_data(const char *URL) | |
| { | |
| #ifndef CURL_DISABLE_WEBSOCKETS | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| const char *url; | |
| size_t plen_min = 0, plen_max = 0, count = 1; | |
| int ch, model = 2; | |
| @@ -468,13 +468,13 @@ static CURLcode test_cli_ws_data(const char *URL) | |
| } | |
| if(model == 1) | |
| - | res = test_ws_data_m1_echo(url, plen_min, plen_max); |
| + | result = test_ws_data_m1_echo(url, plen_min, plen_max); |
| else | |
| - | res = test_ws_data_m2_echo(url, count, plen_min, plen_max); |
| + | result = test_ws_data_m2_echo(url, count, plen_min, plen_max); |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| #else /* !CURL_DISABLE_WEBSOCKETS */ | |
| (void)URL; | |
| @@ -29,21 +29,21 @@ | |
| static CURLcode pingpong(CURL *curl, const char *payload) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| int i; | |
| - | res = ws_send_ping(curl, payload); |
| - | if(res) |
| - | return res; |
| + | result = ws_send_ping(curl, payload); |
| + | if(result) |
| + | return result; |
| for(i = 0; i < 10; ++i) { | |
| curl_mfprintf(stderr, "Receive pong\n"); | |
| - | res = ws_recv_pong(curl, payload); |
| - | if(res == CURLE_AGAIN) { |
| + | result = ws_recv_pong(curl, payload); |
| + | if(result == CURLE_AGAIN) { |
| curlx_wait_ms(100); | |
| continue; | |
| } | |
| ws_close(curl); | |
| - | return res; |
| + | return result; |
| } | |
| ws_close(curl); | |
| return CURLE_RECV_ERROR; | |
| @@ -55,7 +55,7 @@ static CURLcode test_cli_ws_pingpong(const char *URL) | |
| { | |
| #ifndef CURL_DISABLE_WEBSOCKETS | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| const char *payload; | |
| if(!URL || !libtest_arg2) { | |
| @@ -77,16 +77,16 @@ static CURLcode test_cli_ws_pingpong(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_USERAGENT, "ws-pingpong"); | |
| curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 2L); /* websocket style */ | |
| - | res = curl_easy_perform(curl); |
| - | curl_mfprintf(stderr, "curl_easy_perform() returned %u\n", res); |
| - | if(res == CURLE_OK) |
| - | res = pingpong(curl, payload); |
| + | result = curl_easy_perform(curl); |
| + | curl_mfprintf(stderr, "curl_easy_perform() returned %u\n", result); |
| + | if(result == CURLE_OK) |
| + | result = pingpong(curl, payload); |
| /* always cleanup */ | |
| curl_easy_cleanup(curl); | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| #else /* !CURL_DISABLE_WEBSOCKETS */ | |
| (void)URL; | |
| @@ -161,10 +161,11 @@ char *hexdump(const unsigned char *buf, size_t len) | |
| CURLcode ws_send_ping(CURL *curl, const char *send_payload) | |
| { | |
| size_t sent; | |
| - | CURLcode res = curl_ws_send(curl, send_payload, strlen(send_payload), |
| - | &sent, 0, CURLWS_PING); |
| - | curl_mfprintf(stderr, "ws: curl_ws_send returned %u, sent %zu\n", res, sent); |
| - | return res; |
| + | CURLcode result = curl_ws_send(curl, send_payload, strlen(send_payload), |
| + | &sent, 0, CURLWS_PING); |
| + | curl_mfprintf(stderr, "ws: curl_ws_send returned %u, sent %zu\n", |
| + | result, sent); |
| + | return result; |
| } | |
| CURLcode ws_recv_pong(CURL *curl, const char *expected_payload) | |
| @@ -172,11 +173,11 @@ CURLcode ws_recv_pong(CURL *curl, const char *expected_payload) | |
| size_t rlen; | |
| const struct curl_ws_frame *meta; | |
| char buffer[256]; | |
| - | CURLcode res = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); |
| - | if(res) { |
| + | CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); |
| + | if(result) { |
| curl_mfprintf(stderr, "ws: curl_ws_recv returned %u, received %zu\n", | |
| - | res, rlen); |
| - | return res; |
| + | result, rlen); |
| + | return result; |
| } | |
| if(!(meta->flags & CURLWS_PONG)) { | |
| @@ -189,7 +190,7 @@ CURLcode ws_recv_pong(CURL *curl, const char *expected_payload) | |
| if(rlen == strlen(expected_payload) && | |
| !memcmp(expected_payload, buffer, rlen)) { | |
| curl_mfprintf(stderr, "ws: got the same payload back\n"); | |
| - | return CURLE_OK; /* lib2304 returned 'res' here. Intentional? */ |
| + | return CURLE_OK; |
| } | |
| curl_mfprintf(stderr, "ws: did NOT get the same payload back\n"); | |
| return CURLE_RECV_ERROR; | |
| @@ -199,15 +200,16 @@ CURLcode ws_recv_pong(CURL *curl, const char *expected_payload) | |
| void ws_close(CURL *curl) | |
| { | |
| size_t sent; | |
| - | CURLcode res = curl_ws_send(curl, "", 0, &sent, 0, CURLWS_CLOSE); |
| - | curl_mfprintf(stderr, "ws: curl_ws_send returned %u, sent %zu\n", res, sent); |
| + | CURLcode result = curl_ws_send(curl, "", 0, &sent, 0, CURLWS_CLOSE); |
| + | curl_mfprintf(stderr, "ws: curl_ws_send returned %u, sent %zu\n", |
| + | result, sent); |
| } | |
| #endif /* CURL_DISABLE_WEBSOCKETS */ | |
| int main(int argc, const char **argv) | |
| { | |
| const char *URL = ""; | |
| - | CURLcode res; |
| + | CURLcode result; |
| entry_func_t entry_func; | |
| const char *entry_name; | |
| const char *env; | |
| @@ -274,8 +276,8 @@ int main(int argc, const char **argv) | |
| testnum = (int)num; | |
| } | |
| - | res = entry_func(URL); |
| - | curl_mfprintf(stderr, "Test ended with result %d\n", res); |
| + | result = entry_func(URL); |
| + | curl_mfprintf(stderr, "Test ended with result %d\n", result); |
| #ifdef _WIN32 | |
| /* flush buffers of all streams regardless of mode */ | |
| @@ -284,5 +286,5 @@ int main(int argc, const char **argv) | |
| /* Regular program status codes are limited to 0..127 and 126 and 127 have | |
| * special meanings by the shell, so limit a normal return code to 125 */ | |
| - | return (int)res <= 125 ? (int)res : 125; |
| + | return (int)result <= 125 ? (int)result : 125; |
| } | |
| @@ -59,12 +59,12 @@ extern int unitfail; /* for unittests */ | |
| #define CURL_GNUC_DIAG | |
| #endif | |
| - | #define test_setopt(A, B, C) \ |
| - | if((res = curl_easy_setopt(A, B, C)) != CURLE_OK) \ |
| + | #define test_setopt(A, B, C) \ |
| + | if((result = curl_easy_setopt(A, B, C)) != CURLE_OK) \ |
| goto test_cleanup | |
| - | #define test_multi_setopt(A, B, C) \ |
| - | if((res = curl_multi_setopt(A, B, C)) != CURLE_OK) \ |
| + | #define test_multi_setopt(A, B, C) \ |
| + | if((result = curl_multi_setopt(A, B, C)) != CURLE_OK) \ |
| goto test_cleanup | |
| extern const char *libtest_arg2; /* set by first.c to the argv[2] or NULL */ | |
| @@ -148,7 +148,7 @@ void ws_close(CURL *curl); | |
| do { \ | |
| if(((A) = curl_easy_init()) == NULL) { \ | |
| curl_mfprintf(stderr, "%s:%d curl_easy_init() failed\n", Y, Z); \ | |
| - | res = TEST_ERR_EASY_INIT; \ |
| + | result = TEST_ERR_EASY_INIT; \ |
| } \ | |
| } while(0) | |
| @@ -158,7 +158,7 @@ void ws_close(CURL *curl); | |
| #define chk_easy_init(A, Y, Z) \ | |
| do { \ | |
| exe_easy_init(A, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -171,7 +171,7 @@ void ws_close(CURL *curl); | |
| do { \ | |
| if(((A) = curl_multi_init()) == NULL) { \ | |
| curl_mfprintf(stderr, "%s:%d curl_multi_init() failed\n", Y, Z); \ | |
| - | res = TEST_ERR_MULTI; \ |
| + | result = TEST_ERR_MULTI; \ |
| } \ | |
| } while(0) | |
| @@ -181,7 +181,7 @@ void ws_close(CURL *curl); | |
| #define chk_multi_init(A, Y, Z) \ | |
| do { \ | |
| exe_multi_init(A, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -198,7 +198,7 @@ void ws_close(CURL *curl); | |
| "%s:%d curl_easy_setopt() failed, " \ | |
| "with code %d (%s)\n", \ | |
| Y, Z, ec, curl_easy_strerror(ec)); \ | |
| - | res = ec; \ |
| + | result = ec; \ |
| } \ | |
| } while(0) | |
| @@ -208,7 +208,7 @@ void ws_close(CURL *curl); | |
| #define chk_easy_setopt(A, B, C, Y, Z) \ | |
| do { \ | |
| exe_easy_setopt(A, B, C, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -225,7 +225,7 @@ void ws_close(CURL *curl); | |
| "%s:%d curl_multi_setopt() failed, " \ | |
| "with code %d (%s)\n", \ | |
| Y, Z, ec, curl_multi_strerror(ec)); \ | |
| - | res = TEST_ERR_MULTI; \ |
| + | result = TEST_ERR_MULTI; \ |
| } \ | |
| } while(0) | |
| @@ -235,7 +235,7 @@ void ws_close(CURL *curl); | |
| #define chk_multi_setopt(A, B, C, Y, Z) \ | |
| do { \ | |
| exe_multi_setopt(A, B, C, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -252,7 +252,7 @@ void ws_close(CURL *curl); | |
| "%s:%d curl_multi_add_handle() failed, " \ | |
| "with code %d (%s)\n", \ | |
| Y, Z, ec, curl_multi_strerror(ec)); \ | |
| - | res = TEST_ERR_MULTI; \ |
| + | result = TEST_ERR_MULTI; \ |
| } \ | |
| } while(0) | |
| @@ -262,7 +262,7 @@ void ws_close(CURL *curl); | |
| #define chk_multi_add_handle(A, B, Y, Z) \ | |
| do { \ | |
| exe_multi_add_handle(A, B, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -279,7 +279,7 @@ void ws_close(CURL *curl); | |
| "%s:%d curl_multi_remove_handle() failed, " \ | |
| "with code %d (%s)\n", \ | |
| Y, Z, ec, curl_multi_strerror(ec)); \ | |
| - | res = TEST_ERR_MULTI; \ |
| + | result = TEST_ERR_MULTI; \ |
| } \ | |
| } while(0) | |
| @@ -289,7 +289,7 @@ void ws_close(CURL *curl); | |
| #define chk_multi_remove_handle(A, B, Y, Z) \ | |
| do { \ | |
| exe_multi_remove_handle(A, B, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -298,23 +298,23 @@ void ws_close(CURL *curl); | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_multi_perform(A, B, Y, Z) \ |
| - | do { \ |
| - | CURLMcode ec; \ |
| - | if((ec = curl_multi_perform(A, B)) != CURLM_OK) { \ |
| - | curl_mfprintf(stderr, \ |
| - | "%s:%d curl_multi_perform() failed, " \ |
| - | "with code %d (%s)\n", \ |
| - | Y, Z, ec, curl_multi_strerror(ec)); \ |
| - | res = TEST_ERR_MULTI; \ |
| - | } \ |
| - | else if(*(B) < 0) { \ |
| - | curl_mfprintf(stderr, \ |
| - | "%s:%d curl_multi_perform() succeeded, " \ |
| + | #define exe_multi_perform(A, B, Y, Z) \ |
| + | do { \ |
| + | CURLMcode ec; \ |
| + | if((ec = curl_multi_perform(A, B)) != CURLM_OK) { \ |
| + | curl_mfprintf(stderr, \ |
| + | "%s:%d curl_multi_perform() failed, " \ |
| + | "with code %d (%s)\n", \ |
| + | Y, Z, ec, curl_multi_strerror(ec)); \ |
| + | result = TEST_ERR_MULTI; \ |
| + | } \ |
| + | else if(*(B) < 0) { \ |
| + | curl_mfprintf(stderr, \ |
| + | "%s:%d curl_multi_perform() succeeded, " \ |
| "but returned invalid running_handles value (%d)\n", \ | |
| - | Y, Z, (int)*(B)); \ |
| - | res = TEST_ERR_NUM_HANDLES; \ |
| - | } \ |
| + | Y, Z, (int)*(B)); \ |
| + | result = TEST_ERR_NUM_HANDLES; \ |
| + | } \ |
| } while(0) | |
| #define res_multi_perform(A, B) \ | |
| @@ -323,7 +323,7 @@ void ws_close(CURL *curl); | |
| #define chk_multi_perform(A, B, Y, Z) \ | |
| do { \ | |
| exe_multi_perform(A, B, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -340,14 +340,14 @@ void ws_close(CURL *curl); | |
| "%s:%d curl_multi_fdset() failed, " \ | |
| "with code %d (%s)\n", \ | |
| Y, Z, ec, curl_multi_strerror(ec)); \ | |
| - | res = TEST_ERR_MULTI; \ |
| + | result = TEST_ERR_MULTI; \ |
| } \ | |
| else if(*(E) < -1) { \ | |
| curl_mfprintf(stderr, \ | |
| "%s:%d curl_multi_fdset() succeeded, " \ | |
| "but returned invalid max_fd value (%d)\n", \ | |
| Y, Z, (int)*(E)); \ | |
| - | res = TEST_ERR_NUM_HANDLES; \ |
| + | result = TEST_ERR_NUM_HANDLES; \ |
| } \ | |
| } while(0) | |
| @@ -357,7 +357,7 @@ void ws_close(CURL *curl); | |
| #define chk_multi_fdset(A, B, C, D, E, Y, Z) \ | |
| do { \ | |
| exe_multi_fdset(A, B, C, D, E, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -374,14 +374,14 @@ void ws_close(CURL *curl); | |
| "%s:%d curl_multi_timeout() failed, " \ | |
| "with code %d (%s)\n", \ | |
| Y, Z, ec, curl_multi_strerror(ec)); \ | |
| - | res = TEST_ERR_BAD_TIMEOUT; \ |
| + | result = TEST_ERR_BAD_TIMEOUT; \ |
| } \ | |
| else if(*(B) < -1L) { \ | |
| curl_mfprintf(stderr, \ | |
| "%s:%d curl_multi_timeout() succeeded, " \ | |
| "but returned invalid timeout value (%ld)\n", \ | |
| Y, Z, (long)*(B)); \ | |
| - | res = TEST_ERR_BAD_TIMEOUT; \ |
| + | result = TEST_ERR_BAD_TIMEOUT; \ |
| } \ | |
| } while(0) | |
| @@ -391,7 +391,7 @@ void ws_close(CURL *curl); | |
| #define chk_multi_timeout(A, B, Y, Z) \ | |
| do { \ | |
| exe_multi_timeout(A, B, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -408,14 +408,14 @@ void ws_close(CURL *curl); | |
| "%s:%d curl_multi_poll() failed, " \ | |
| "with code %d (%s)\n", \ | |
| Y, Z, ec, curl_multi_strerror(ec)); \ | |
| - | res = TEST_ERR_MULTI; \ |
| + | result = TEST_ERR_MULTI; \ |
| } \ | |
| else if(*(E) < 0) { \ | |
| curl_mfprintf(stderr, \ | |
| "%s:%d curl_multi_poll() succeeded, " \ | |
| "but returned invalid numfds value (%d)\n", \ | |
| Y, Z, (int)*(E)); \ | |
| - | res = TEST_ERR_NUM_HANDLES; \ |
| + | result = TEST_ERR_NUM_HANDLES; \ |
| } \ | |
| } while(0) | |
| @@ -425,7 +425,7 @@ void ws_close(CURL *curl); | |
| #define chk_multi_poll(A, B, C, D, E, Y, Z) \ | |
| do { \ | |
| exe_multi_poll(A, B, C, D, E, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -442,7 +442,7 @@ void ws_close(CURL *curl); | |
| "%s:%d curl_multi_wakeup() failed, " \ | |
| "with code %d (%s)\n", \ | |
| Y, Z, ec, curl_multi_strerror(ec)); \ | |
| - | res = TEST_ERR_MULTI; \ |
| + | result = TEST_ERR_MULTI; \ |
| } \ | |
| } while(0) | |
| @@ -452,7 +452,7 @@ void ws_close(CURL *curl); | |
| #define chk_multi_wakeup(A, Y, Z) \ | |
| do { \ | |
| exe_multi_wakeup(A, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -471,7 +471,7 @@ void ws_close(CURL *curl); | |
| "%s:%d select() failed, with " \ | |
| "errno %d (%s)\n", \ | |
| Y, Z, ec, curlx_strerror(ec, ecbuf, sizeof(ecbuf))); \ | |
| - | res = TEST_ERR_SELECT; \ |
| + | result = TEST_ERR_SELECT; \ |
| } \ | |
| } while(0) | |
| @@ -481,7 +481,7 @@ void ws_close(CURL *curl); | |
| #define chk_select_test(A, B, C, D, E, Y, Z) \ | |
| do { \ | |
| exe_select_test(A, B, C, D, E, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -505,7 +505,7 @@ void ws_close(CURL *curl); | |
| "%s:%d ABORTING TEST, since it seems " \ | |
| "that it would have run forever (%ld ms > %ld ms)\n", \ | |
| Y, Z, (long)timediff, (long)(TEST_HANG_TIMEOUT)); \ | |
| - | res = TEST_ERR_RUNS_FOREVER; \ |
| + | result = TEST_ERR_RUNS_FOREVER; \ |
| } \ | |
| } while(0) | |
| @@ -518,7 +518,7 @@ void ws_close(CURL *curl); | |
| #define chk_test_timedout(T, Y, Z) \ | |
| do { \ | |
| exe_test_timedout(T, Y, Z); \ | |
| - | if(res) \ |
| + | if(result) \ |
| goto test_cleanup; \ | |
| } while(0) | |
| @@ -538,7 +538,7 @@ void ws_close(CURL *curl); | |
| "%s:%d curl_global_init() failed, " \ | |
| "with code %d (%s)\n", \ | |
| Y, Z, ec, curl_easy_strerror(ec)); \ | |
| - | res = ec; \ |
| + | result = ec; \ |
| } \ | |
| } while(0) | |
| @@ -548,8 +548,8 @@ void ws_close(CURL *curl); | |
| #define chk_global_init(A, Y, Z) \ | |
| do { \ | |
| exe_global_init(A, Y, Z); \ | |
| - | if(res) \ |
| - | return res; \ |
| + | if(result) \ |
| + | return result; \ |
| } while(0) | |
| /* global_init() is different than other macros. In case of | |
| @@ -42,7 +42,7 @@ | |
| struct testparams { | |
| unsigned int flags; /* ORed flags as above. */ | |
| - | CURLcode res; /* Code that should be returned by curl_easy_perform(). */ |
| + | CURLcode result; /* Code that should be returned by curl_easy_perform(). */ |
| }; | |
| static const struct testparams testparams[] = { | |
| @@ -84,7 +84,7 @@ static size_t writedata(char *data, size_t size, size_t nmemb, void *userdata) | |
| static int onetest(CURL *curl, const char *url, const struct testparams *p, | |
| size_t num) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| unsigned int replyselector; | |
| char urlbuf[256]; | |
| @@ -99,15 +99,15 @@ static int onetest(CURL *curl, const char *url, const struct testparams *p, | |
| "3-1000000" : (char *)NULL); | |
| test_setopt(curl, CURLOPT_FAILONERROR, (p->flags & F_FAIL) ? 1L : 0L); | |
| hasbody = 0; | |
| - | res = curl_easy_perform(curl); |
| - | if(res != p->res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result != p->result) { |
| curl_mprintf("%zu: bad error code (%d): resume=%s, fail=%s, http416=%s, " | |
| - | "content-range=%s, expected=%d\n", num, res, |
| + | "content-range=%s, expected=%d\n", num, result, |
| (p->flags & F_RESUME) ? "yes" : "no", | |
| (p->flags & F_FAIL) ? "yes" : "no", | |
| (p->flags & F_HTTP416) ? "yes" : "no", | |
| (p->flags & F_CONTENTRANGE) ? "yes" : "no", | |
| - | p->res); |
| + | p->result); |
| return 1; | |
| } | |
| if(hasbody && (p->flags & F_IGNOREBODY)) { | |
| @@ -131,7 +131,7 @@ test_cleanup: | |
| static CURLcode test_lib1156(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| size_t i; | |
| int status = 0; | |
| @@ -167,5 +167,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -43,7 +43,7 @@ static CURLcode test_lib1308(const char *URL) | |
| { | |
| int errorcount = 0; | |
| CURLFORMcode rc; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int formres = 0; | |
| struct curl_httppost *post = NULL; | |
| struct curl_httppost *last = NULL; | |
| @@ -27,7 +27,7 @@ struct t1485_transfer_status { | |
| CURL *curl; | |
| curl_off_t out_len; | |
| size_t hd_line; | |
| - | CURLcode res; |
| + | CURLcode result; |
| int http_status; | |
| }; | |
| @@ -37,7 +37,7 @@ static size_t t1485_header_callback(char *ptr, size_t size, size_t nmemb, | |
| struct t1485_transfer_status *st = (struct t1485_transfer_status *)userp; | |
| const char *hd = ptr; | |
| size_t len = size * nmemb; | |
| - | CURLcode res; |
| + | CURLcode result; |
| (void)fwrite(ptr, size, nmemb, stdout); | |
| ++st->hd_line; | |
| @@ -45,22 +45,22 @@ static size_t t1485_header_callback(char *ptr, size_t size, size_t nmemb, | |
| curl_off_t clen; | |
| long httpcode = 0; | |
| /* end of a response */ | |
| - | res = curl_easy_getinfo(st->curl, CURLINFO_RESPONSE_CODE, &httpcode); |
| + | result = curl_easy_getinfo(st->curl, CURLINFO_RESPONSE_CODE, &httpcode); |
| curl_mfprintf(stderr, "header_callback, get status: %ld, %d\n", | |
| - | httpcode, res); |
| + | httpcode, result); |
| if(httpcode < 100 || httpcode >= 1000) { | |
| curl_mfprintf(stderr, "header_callback, invalid status: %ld, %d\n", | |
| - | httpcode, res); |
| + | httpcode, result); |
| return CURLE_WRITE_ERROR; | |
| } | |
| st->http_status = (int)httpcode; | |
| if(st->http_status >= 200 && st->http_status < 300) { | |
| - | res = curl_easy_getinfo(st->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, |
| + | result = curl_easy_getinfo(st->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, |
| &clen); | |
| curl_mfprintf(stderr, "header_callback, info Content-Length: " | |
| - | "%" CURL_FORMAT_CURL_OFF_T ", %d\n", clen, res); |
| - | if(res) { |
| - | st->res = res; |
| + | "%" CURL_FORMAT_CURL_OFF_T ", %d\n", clen, result); |
| + | if(result) { |
| + | st->result = result; |
| return CURLE_WRITE_ERROR; | |
| } | |
| if(clen < 0) { | |
| @@ -86,7 +86,7 @@ static size_t t1485_write_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib1485(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct t1485_transfer_status st; | |
| start_test_timing(); | |
| @@ -106,12 +106,12 @@ static CURLcode test_lib1485(const char *URL) | |
| easy_setopt(curl, CURLOPT_NOPROGRESS, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; /* return the final return code */ |
| + | return result; /* return the final return code */ |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode test_lib1500(const char *URL) | |
| CURLM *multi = NULL; | |
| int still_running; | |
| CURLcode i = TEST_ERR_FAILURE; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLMsg *msg; | |
| start_test_timing(); | |
| @@ -50,12 +50,12 @@ static CURLcode test_lib1500(const char *URL) | |
| abort_on_test_timeout(); | |
| while(still_running) { | |
| - | CURLMcode mres; |
| + | CURLMcode mresult; |
| int num; | |
| - | mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| - | if(mres != CURLM_OK) { |
| - | curl_mprintf("curl_multi_wait() returned %d\n", mres); |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | mresult = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| + | if(mresult != CURLM_OK) { |
| + | curl_mprintf("curl_multi_wait() returned %d\n", mresult); |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -80,8 +80,8 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | if(res) |
| - | i = res; |
| + | if(result) |
| + | i = result; |
| return i; /* return the final return code */ | |
| } | |
| @@ -32,7 +32,7 @@ static CURLcode test_lib1501(const char *URL) | |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int still_running = 0; | |
| start_test_timing(); | |
| @@ -89,7 +89,7 @@ static CURLcode test_lib1501(const char *URL) | |
| curl_mfprintf(stderr, "pong = %ld\n", (long)e); | |
| if(e > MAX_BLOCKED_TIME_MS) { | |
| - | res = CURLE_TOO_LARGE; |
| + | result = CURLE_TOO_LARGE; |
| break; | |
| } | |
| } | |
| @@ -102,5 +102,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -37,15 +37,15 @@ static CURLcode test_lib1502(const char *URL) | |
| CURL *curldupe; | |
| CURLM *multi = NULL; | |
| int still_running; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| char redirect[160]; | |
| /* DNS cache injection */ | |
| struct curl_slist *dns_cache_list; | |
| res_global_init(CURL_GLOBAL_ALL); | |
| - | if(res) { |
| - | return res; |
| + | if(result) { |
| + | return result; |
| } | |
| curl_msnprintf(redirect, sizeof(redirect), "google.com:%s:%s", libtest_arg2, | |
| @@ -146,5 +146,5 @@ test_cleanup: | |
| curl_slist_free_all(dns_cache_list); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1506(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl[NUM_HANDLES] = { 0 }; | |
| int running; | |
| CURLM *multi = NULL; | |
| @@ -127,5 +127,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -36,7 +36,7 @@ static CURLcode test_lib1507(const char *URL) | |
| { | |
| static const int MULTI_PERFORM_HANG_TIMEOUT = 60 * 1000; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| int still_running = 1; | |
| @@ -135,5 +135,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1508(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLM *multi = NULL; | |
| (void)URL; | |
| @@ -43,5 +43,5 @@ test_cleanup: | |
| curl_mprintf("We are done\n"); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -46,7 +46,7 @@ static CURLcode test_lib1509(const char *URL) | |
| long headerSize; | |
| CURLcode code; | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -67,7 +67,7 @@ static CURLcode test_lib1509(const char *URL) | |
| curl_mfprintf(stderr, "%s:%d curl_easy_perform() failed, " | |
| "with code %d (%s)\n", | |
| __FILE__, __LINE__, code, curl_easy_strerror(code)); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -76,7 +76,7 @@ static CURLcode test_lib1509(const char *URL) | |
| curl_mfprintf(stderr, "%s:%d curl_easy_getinfo() failed, " | |
| "with code %d (%s)\n", | |
| __FILE__, __LINE__, code, curl_easy_strerror(code)); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -88,5 +88,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -27,7 +27,7 @@ static CURLcode test_lib1510(const char *URL) | |
| { | |
| static const int NUM_URLS = 4; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| int i; | |
| char target_url[256]; | |
| @@ -76,8 +76,8 @@ static CURLcode test_lib1510(const char *URL) | |
| target_url[sizeof(target_url) - 1] = '\0'; | |
| easy_setopt(curl, CURLOPT_URL, target_url); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| abort_on_test_timeout(); | |
| @@ -93,5 +93,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -27,7 +27,7 @@ static CURLcode test_lib1511(const char *URL) | |
| { | |
| long unmet; | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -40,30 +40,30 @@ static CURLcode test_lib1511(const char *URL) | |
| /* TIMEVALUE in the future */ | |
| easy_setopt(curl, CURLOPT_TIMEVALUE, 1566210680L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet); | |
| if(unmet != 1L) { | |
| - | res = TEST_ERR_FAILURE; /* not correct */ |
| + | result = TEST_ERR_FAILURE; /* not correct */ |
| goto test_cleanup; | |
| } | |
| /* TIMEVALUE in the past */ | |
| easy_setopt(curl, CURLOPT_TIMEVALUE, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet); | |
| if(unmet) { | |
| - | res = TEST_ERR_FAILURE; /* not correct */ |
| + | result = TEST_ERR_FAILURE; /* not correct */ |
| goto test_cleanup; | |
| } | |
| - | res = TEST_ERR_SUCCESS; /* this is where we should be */ |
| + | result = TEST_ERR_SUCCESS; /* this is where we should be */ |
| test_cleanup: | |
| @@ -71,5 +71,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -32,7 +32,7 @@ | |
| static CURLcode test_lib1512(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl[2] = { NULL, NULL }; | |
| const char *port = libtest_arg3; | |
| const char *address = libtest_arg2; | |
| @@ -74,9 +74,9 @@ static CURLcode test_lib1512(const char *URL) | |
| easy_setopt(curl[0], CURLOPT_RESOLVE, slist); | |
| /* run each transfer */ | |
| - | for(i = 0; (i < CURL_ARRAYSIZE(curl)) && !res; i++) { |
| - | res = curl_easy_perform(curl[i]); |
| - | if(res) |
| + | for(i = 0; (i < CURL_ARRAYSIZE(curl)) && !result; i++) { |
| + | result = curl_easy_perform(curl[i]); |
| + | if(result) |
| goto test_cleanup; | |
| } | |
| @@ -87,5 +87,5 @@ test_cleanup: | |
| curl_slist_free_all(slist); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -48,7 +48,7 @@ static int progressKiller(void *arg, | |
| static CURLcode test_lib1513(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -61,7 +61,7 @@ static CURLcode test_lib1513(const char *URL) | |
| easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL); | |
| easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -70,5 +70,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -53,7 +53,7 @@ static size_t t1514_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib1514(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| static char testdata[] = "dummy"; | |
| @@ -74,12 +74,12 @@ static CURLcode test_lib1514(const char *URL) | |
| easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); | |
| } | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -40,7 +40,7 @@ static CURLcode do_one_request(CURLM *multi, const char *URL, | |
| CURL *curl; | |
| struct curl_slist *resolve_list = NULL; | |
| int still_running; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLMsg *msg; | |
| int msgs_left; | |
| @@ -86,7 +86,7 @@ static CURLcode do_one_request(CURLM *multi, const char *URL, | |
| do { | |
| msg = curl_multi_info_read(multi, &msgs_left); | |
| if(msg && msg->msg == CURLMSG_DONE && msg->easy_handle == curl) { | |
| - | res = msg->data.result; |
| + | result = msg->data.result; |
| break; | |
| } | |
| } while(msg); | |
| @@ -97,13 +97,13 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_slist_free_all(resolve_list); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode test_lib1515(const char *URL) | |
| { | |
| CURLM *multi = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| const char *path = URL; | |
| const char *address = libtest_arg2; | |
| const char *port = libtest_arg3; | |
| @@ -126,9 +126,9 @@ static CURLcode test_lib1515(const char *URL) | |
| "http://testserver.example.com:%s/%s%04d", port, path, i); | |
| /* second request must succeed like the first one */ | |
| - | res = do_one_request(multi, target_url, dns_entry); |
| - | if(res != CURLE_OK) { |
| - | curl_mfprintf(stderr, "request %s failed with %d\n", target_url, res); |
| + | result = do_one_request(multi, target_url, dns_entry); |
| + | if(result != CURLE_OK) { |
| + | curl_mfprintf(stderr, "request %s failed with %d\n", target_url, result); |
| goto test_cleanup; | |
| } | |
| @@ -141,5 +141,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -55,7 +55,7 @@ static CURLcode test_lib1517(const char *URL) | |
| "this is what we post to the silly web server\n"; | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct t1517_WriteThis pooh; | |
| @@ -98,8 +98,8 @@ static CURLcode test_lib1517(const char *URL) | |
| /* detect HTTP error codes >= 400 */ | |
| /* test_setopt(curl, CURLOPT_FAILONERROR, 1L); */ | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -107,5 +107,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -38,7 +38,7 @@ static size_t t1518_write_cb(char *buffer, size_t size, size_t nitems, | |
| static CURLcode test_lib1518(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| long curlResponseCode; | |
| long curlRedirectCount; | |
| char *effectiveUrl = NULL; | |
| @@ -68,9 +68,9 @@ static CURLcode test_lib1518(const char *URL) | |
| test_setopt(curl, CURLOPT_FOLLOWLOCATION, 0L); | |
| } | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &curlResponseCode); | |
| @@ -79,12 +79,12 @@ static CURLcode test_lib1518(const char *URL) | |
| curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &redirectUrl); | |
| test_setopt(curl, CURLOPT_WRITEFUNCTION, t1518_write_cb); | |
| - | curl_mprintf("res %d\n" |
| + | curl_mprintf("result %d\n" |
| "status %ld\n" | |
| "redirects %ld\n" | |
| "effectiveurl %s\n" | |
| "redirecturl %s\n", | |
| - | res, |
| + | result, |
| curlResponseCode, | |
| curlRedirectCount, | |
| effectiveUrl, | |
| @@ -96,5 +96,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| curl_url_cleanup(urlu); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -65,7 +65,7 @@ static size_t t1520_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib1520(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| struct curl_slist *rcpt_list = NULL; | |
| struct upload_status upload_ctx = { 0 }; | |
| @@ -95,7 +95,7 @@ static CURLcode test_lib1520(const char *URL) | |
| test_setopt(curl, CURLOPT_MAIL_RCPT, rcpt_list); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -103,5 +103,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -49,7 +49,7 @@ static CURLcode test_lib1522(const char *URL) | |
| static char g_Data[40 * 1024]; /* POST 40KB */ | |
| CURLcode code = TEST_ERR_MAJOR_BAD; | |
| - | CURLcode res; |
| + | CURLcode result; |
| struct curl_slist *pHeaderList = NULL; | |
| CURL *curl = curl_easy_init(); | |
| memset(g_Data, 'A', sizeof(g_Data)); /* send As! */ | |
| @@ -53,7 +53,7 @@ static CURLcode run(CURL *curl, long limit, long time) | |
| static CURLcode test_lib1523(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| char buffer[CURL_ERROR_SIZE]; | |
| curl_global_init(CURL_GLOBAL_ALL); | |
| @@ -64,18 +64,18 @@ static CURLcode test_lib1523(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); | |
| curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, dload_progress_cb); | |
| - | res = run(curl, 1, 2); |
| - | if(res) |
| - | curl_mfprintf(stderr, "error (%d) %s\n", res, buffer); |
| + | result = run(curl, 1, 2); |
| + | if(result) |
| + | curl_mfprintf(stderr, "error (%d) %s\n", result, buffer); |
| - | res = run(curl, 12000, 1); |
| - | if(res != CURLE_OPERATION_TIMEDOUT) |
| - | curl_mfprintf(stderr, "error (%d) %s\n", res, buffer); |
| + | result = run(curl, 12000, 1); |
| + | if(result != CURLE_OPERATION_TIMEDOUT) |
| + | curl_mfprintf(stderr, "error (%d) %s\n", result, buffer); |
| else | |
| - | res = CURLE_OK; |
| + | result = CURLE_OK; |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -46,7 +46,7 @@ static size_t t1525_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) | |
| static CURLcode test_lib1525(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_FAILED_INIT; |
| + | CURLcode result = CURLE_FAILED_INIT; |
| /* http and proxy header list */ | |
| struct curl_slist *hhl = NULL; | |
| @@ -83,7 +83,7 @@ static CURLcode test_lib1525(const char *URL) | |
| test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L); | |
| test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(t1525_testdata)); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -93,5 +93,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -45,7 +45,7 @@ static size_t t1526_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) | |
| static CURLcode test_lib1526(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_FAILED_INIT; |
| + | CURLcode result = CURLE_FAILED_INIT; |
| /* http and proxy header list */ | |
| struct curl_slist *hhl = NULL, *phl = NULL, *tmp = NULL; | |
| @@ -87,7 +87,7 @@ static CURLcode test_lib1526(const char *URL) | |
| test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L); | |
| test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(t1526_testdata)); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -99,5 +99,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -45,7 +45,7 @@ static size_t t1527_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) | |
| static CURLcode test_lib1527(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_FAILED_INIT; |
| + | CURLcode result = CURLE_FAILED_INIT; |
| /* http header list */ | |
| struct curl_slist *hhl = NULL, *tmp = NULL; | |
| @@ -85,7 +85,7 @@ static CURLcode test_lib1527(const char *URL) | |
| test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(t1527_testdata)); | |
| test_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -95,5 +95,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1528(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_FAILED_INIT; |
| + | CURLcode result = CURLE_FAILED_INIT; |
| /* http header list */ | |
| struct curl_slist *hhl = NULL; | |
| struct curl_slist *phl = NULL; | |
| @@ -59,7 +59,7 @@ static CURLcode test_lib1528(const char *URL) | |
| test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -68,5 +68,5 @@ test_cleanup: | |
| curl_slist_free_all(phl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1529(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_FAILED_INIT; |
| + | CURLcode result = CURLE_FAILED_INIT; |
| char bURL[512]; | |
| curl_msnprintf(bURL, sizeof(bURL), | |
| "%s HTTP/1.1\r\nGET http://1529.com/1529", URL); | |
| @@ -49,12 +49,12 @@ static CURLcode test_lib1529(const char *URL) | |
| test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -37,7 +37,7 @@ static curl_socket_t opensocket(void *clientp, | |
| static CURLcode test_lib1530(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_FAILED_INIT; |
| + | CURLcode result = CURLE_FAILED_INIT; |
| (void)URL; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -56,12 +56,12 @@ static CURLcode test_lib1530(const char *URL) | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| test_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -33,7 +33,7 @@ static CURLcode test_lib1531(const char *URL) | |
| int still_running; /* keep number of running handles */ | |
| CURLMsg *msg; /* for picking up messages with the transfer status */ | |
| int msgs_left; /* how many messages are left */ | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| start_test_timing(); | |
| @@ -61,7 +61,7 @@ static CURLcode test_lib1531(const char *URL) | |
| do { | |
| struct timeval timeout; | |
| int rc; /* select() return code */ | |
| - | CURLMcode mc; /* curl_multi_fdset() return code */ |
| + | CURLMcode mresult; /* curl_multi_fdset() return code */ |
| fd_set fdread; | |
| fd_set fdwrite; | |
| @@ -88,10 +88,10 @@ static CURLcode test_lib1531(const char *URL) | |
| } | |
| /* get file descriptors from the transfers */ | |
| - | mc = curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd); |
| + | mresult = curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd); |
| - | if(mc != CURLM_OK) { |
| - | curl_mfprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc); |
| + | if(mresult != CURLM_OK) { |
| + | curl_mfprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mresult); |
| break; | |
| } | |
| @@ -142,5 +142,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode test_lib1532(const char *URL) | |
| { | |
| CURL *curl; | |
| long httpcode; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -37,36 +37,36 @@ static CURLcode test_lib1532(const char *URL) | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_perform() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| - | res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpcode); |
| - | if(res) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpcode); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(httpcode != 200) { | |
| curl_mfprintf(stderr, "%s:%d unexpected response code %ld\n", | |
| __FILE__, __LINE__, httpcode); | |
| - | res = CURLE_HTTP_RETURNED_ERROR; |
| + | result = CURLE_HTTP_RETURNED_ERROR; |
| goto test_cleanup; | |
| } | |
| /* Test for a regression of github bug 1017 (response code does not reset) */ | |
| curl_easy_reset(curl); | |
| - | res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpcode); |
| - | if(res) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpcode); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(httpcode) { | |
| @@ -74,12 +74,12 @@ static CURLcode test_lib1532(const char *URL) | |
| "%s:%d curl_easy_reset failed to zero the response code\n" | |
| "possible regression of github bug 1017\n", | |
| __FILE__, __LINE__); | |
| - | res = CURLE_HTTP_RETURNED_ERROR; |
| + | result = CURLE_HTTP_RETURNED_ERROR; |
| goto test_cleanup; | |
| } | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -93,17 +93,17 @@ static CURLcode perform_and_check_connections(CURL *curl, | |
| const char *description, | |
| long expected_connections) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| long connections = 0; | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_OK) { |
| - | curl_mfprintf(stderr, "curl_easy_perform() failed with %d\n", res); |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_OK) { |
| + | curl_mfprintf(stderr, "curl_easy_perform() failed with %d\n", result); |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | res = curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &connections); |
| - | if(res != CURLE_OK) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &connections); |
| + | if(result != CURLE_OK) { |
| curl_mfprintf(stderr, "curl_easy_getinfo() failed\n"); | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| @@ -123,8 +123,7 @@ static CURLcode test_lib1533(const char *URL) | |
| { | |
| struct cb_data data; | |
| CURL *curl = NULL; | |
| - | CURLcode res = TEST_ERR_FAILURE; |
| - | CURLcode result; |
| + | CURLcode result = TEST_ERR_FAILURE; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -150,10 +149,11 @@ static CURLcode test_lib1533(const char *URL) | |
| test_setopt(curl, CURLOPT_WRITEFUNCTION, t1533_write_cb); | |
| test_setopt(curl, CURLOPT_WRITEDATA, &data); | |
| - | result = perform_and_check_connections(curl, |
| - | "First request without CURLOPT_KEEP_SENDING_ON_ERROR", 1); |
| + | result = |
| + | perform_and_check_connections(curl, |
| + | "First request without " |
| + | "CURLOPT_KEEP_SENDING_ON_ERROR", 1); |
| if(result != TEST_ERR_SUCCESS) { | |
| - | res = result; |
| goto test_cleanup; | |
| } | |
| @@ -162,7 +162,6 @@ static CURLcode test_lib1533(const char *URL) | |
| result = perform_and_check_connections(curl, | |
| "Second request without CURLOPT_KEEP_SENDING_ON_ERROR", 1); | |
| if(result != TEST_ERR_SUCCESS) { | |
| - | res = result; |
| goto test_cleanup; | |
| } | |
| @@ -173,7 +172,6 @@ static CURLcode test_lib1533(const char *URL) | |
| result = perform_and_check_connections(curl, | |
| "First request with CURLOPT_KEEP_SENDING_ON_ERROR", 1); | |
| if(result != TEST_ERR_SUCCESS) { | |
| - | res = result; |
| goto test_cleanup; | |
| } | |
| @@ -182,17 +180,14 @@ static CURLcode test_lib1533(const char *URL) | |
| result = perform_and_check_connections(curl, | |
| "Second request with CURLOPT_KEEP_SENDING_ON_ERROR", 0); | |
| if(result != TEST_ERR_SUCCESS) { | |
| - | res = result; |
| goto test_cleanup; | |
| } | |
| - | res = TEST_ERR_SUCCESS; |
| + | result = TEST_ERR_SUCCESS; |
| test_cleanup: | |
| - | |
| curl_easy_cleanup(curl); | |
| - | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode test_lib1534(const char *URL) | |
| { | |
| CURL *curl, *dupe = NULL; | |
| long filetime; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -38,47 +38,47 @@ static CURLcode test_lib1534(const char *URL) | |
| /* Test that a filetime is properly initialized on curl_easy_init. | |
| */ | |
| - | res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); |
| - | if(res) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(filetime != -1) { | |
| curl_mfprintf(stderr, | |
| "%s:%d filetime init failed; expected -1 but is %ld\n", | |
| __FILE__, __LINE__, filetime); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| easy_setopt(curl, CURLOPT_FILETIME, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_perform() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| /* Test that a filetime is properly set after receiving an HTTP resource. | |
| */ | |
| - | res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); |
| - | if(res) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(filetime != 30) { | |
| curl_mfprintf(stderr, "%s:%d filetime of http resource is incorrect; " | |
| "expected 30 but is %ld\n", | |
| __FILE__, __LINE__, filetime); | |
| - | res = CURLE_HTTP_RETURNED_ERROR; |
| + | result = CURLE_HTTP_RETURNED_ERROR; |
| goto test_cleanup; | |
| } | |
| @@ -89,22 +89,22 @@ static CURLcode test_lib1534(const char *URL) | |
| if(!dupe) { | |
| curl_mfprintf(stderr, "%s:%d curl_easy_duphandle() failed\n", | |
| __FILE__, __LINE__); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| - | res = curl_easy_getinfo(dupe, CURLINFO_FILETIME, &filetime); |
| - | if(res) { |
| + | result = curl_easy_getinfo(dupe, CURLINFO_FILETIME, &filetime); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(filetime != -1) { | |
| curl_mfprintf(stderr, | |
| "%s:%d filetime init failed; expected -1 but is %ld\n", | |
| __FILE__, __LINE__, filetime); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| @@ -113,18 +113,18 @@ static CURLcode test_lib1534(const char *URL) | |
| curl_easy_reset(curl); | |
| - | res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); |
| - | if(res) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(filetime != -1) { | |
| curl_mfprintf(stderr, | |
| "%s:%d filetime init failed; expected -1 but is %ld\n", | |
| __FILE__, __LINE__, filetime); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| @@ -132,5 +132,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_easy_cleanup(dupe); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode test_lib1535(const char *URL) | |
| { | |
| CURL *curl, *dupe = NULL; | |
| long protocol; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -38,41 +38,41 @@ static CURLcode test_lib1535(const char *URL) | |
| /* Test that protocol is properly initialized on curl_easy_init. | |
| */ | |
| - | res = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); |
| + | result = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(protocol) { | |
| curl_mfprintf(stderr, | |
| "%s:%d protocol init failed; expected 0 but is %ld\n", | |
| __FILE__, __LINE__, protocol); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_perform() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| /* Test that a protocol is properly set after receiving an HTTP resource. | |
| */ | |
| - | res = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); |
| + | result = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(protocol != CURLPROTO_HTTP) { | |
| @@ -80,7 +80,7 @@ static CURLcode test_lib1535(const char *URL) | |
| "%s:%d protocol of http resource is incorrect; " | |
| "expected %ld but is %ld\n", | |
| __FILE__, __LINE__, CURLPROTO_HTTP, protocol); | |
| - | res = CURLE_HTTP_RETURNED_ERROR; |
| + | result = CURLE_HTTP_RETURNED_ERROR; |
| goto test_cleanup; | |
| } | |
| @@ -91,23 +91,23 @@ static CURLcode test_lib1535(const char *URL) | |
| if(!dupe) { | |
| curl_mfprintf(stderr, "%s:%d curl_easy_duphandle() failed\n", | |
| __FILE__, __LINE__); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| - | res = curl_easy_getinfo(dupe, CURLINFO_PROTOCOL, &protocol); |
| + | result = curl_easy_getinfo(dupe, CURLINFO_PROTOCOL, &protocol); |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(protocol) { | |
| curl_mfprintf(stderr, | |
| "%s:%d protocol init failed; expected 0 but is %ld\n", | |
| __FILE__, __LINE__, protocol); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| @@ -116,19 +116,19 @@ static CURLcode test_lib1535(const char *URL) | |
| curl_easy_reset(curl); | |
| - | res = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); |
| + | result = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(protocol) { | |
| curl_mfprintf(stderr, | |
| "%s:%d protocol init failed; expected 0 but is %ld\n", | |
| __FILE__, __LINE__, protocol); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| @@ -136,5 +136,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_easy_cleanup(dupe); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode test_lib1536(const char *URL) | |
| { | |
| CURL *curl, *dupe = NULL; | |
| char *scheme; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -38,39 +38,39 @@ static CURLcode test_lib1536(const char *URL) | |
| /* Test that scheme is properly initialized on curl_easy_init. | |
| */ | |
| - | res = curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme); |
| - | if(res) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(scheme) { | |
| curl_mfprintf(stderr, | |
| "%s:%d scheme init failed; expected NULL\n", | |
| __FILE__, __LINE__); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_perform() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| /* Test that a scheme is properly set after receiving an HTTP resource. | |
| */ | |
| - | res = curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme); |
| - | if(res) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(!scheme || memcmp(scheme, "http", 5) != 0) { | |
| @@ -78,7 +78,7 @@ static CURLcode test_lib1536(const char *URL) | |
| "expected 'http' but is %s\n", | |
| __FILE__, __LINE__, | |
| (scheme == NULL ? "NULL" : "invalid")); | |
| - | res = CURLE_HTTP_RETURNED_ERROR; |
| + | result = CURLE_HTTP_RETURNED_ERROR; |
| goto test_cleanup; | |
| } | |
| @@ -89,21 +89,21 @@ static CURLcode test_lib1536(const char *URL) | |
| if(!dupe) { | |
| curl_mfprintf(stderr, "%s:%d curl_easy_duphandle() failed\n", | |
| __FILE__, __LINE__); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| - | res = curl_easy_getinfo(dupe, CURLINFO_SCHEME, &scheme); |
| - | if(res) { |
| + | result = curl_easy_getinfo(dupe, CURLINFO_SCHEME, &scheme); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(scheme) { | |
| curl_mfprintf(stderr, "%s:%d scheme init failed; expected NULL\n", | |
| __FILE__, __LINE__); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| @@ -112,17 +112,17 @@ static CURLcode test_lib1536(const char *URL) | |
| curl_easy_reset(curl); | |
| - | res = curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme); |
| - | if(res) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_getinfo() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| if(scheme) { | |
| curl_mfprintf(stderr, "%s:%d scheme init failed; expected NULL\n", | |
| __FILE__, __LINE__); | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| @@ -130,5 +130,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_easy_cleanup(dupe); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -27,7 +27,7 @@ static CURLcode test_lib1537(const char *URL) | |
| { | |
| const unsigned char a[] = { 0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, | |
| 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7 }; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| char *ptr = NULL; | |
| int asize; | |
| int outlen = 0; | |
| @@ -48,7 +48,7 @@ static CURLcode test_lib1537(const char *URL) | |
| /* deprecated API */ | |
| ptr = curl_escape((const char *)a, asize); | |
| if(!ptr) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| curl_mprintf("%s\n", ptr); | |
| @@ -62,7 +62,7 @@ static CURLcode test_lib1537(const char *URL) | |
| /* deprecated API */ | |
| raw = curl_unescape(ptr, (int)strlen(ptr)); | |
| if(!raw) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| outlen = (int)strlen(raw); | |
| @@ -85,5 +85,5 @@ test_cleanup: | |
| curl_free(ptr); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,9 +25,9 @@ | |
| static CURLcode test_lib1538(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLcode easyret; | |
| - | CURLMcode multiret; |
| + | CURLMcode mresult; |
| CURLSHcode shareret; | |
| CURLUcode urlret; | |
| (void)URL; | |
| @@ -45,9 +45,9 @@ static CURLcode test_lib1538(const char *URL) | |
| for(easyret = CURLE_OK; easyret <= CURL_LAST; easyret++) { | |
| curl_mprintf("e%d: %s\n", easyret, curl_easy_strerror(easyret)); | |
| } | |
| - | for(multiret = CURLM_CALL_MULTI_PERFORM; multiret <= CURLM_LAST; |
| - | multiret++) { |
| - | curl_mprintf("m%d: %s\n", multiret, curl_multi_strerror(multiret)); |
| + | for(mresult = CURLM_CALL_MULTI_PERFORM; mresult <= CURLM_LAST; |
| + | mresult++) { |
| + | curl_mprintf("m%d: %s\n", mresult, curl_multi_strerror(mresult)); |
| } | |
| for(shareret = CURLSHE_OK; shareret <= CURLSHE_LAST; shareret++) { | |
| curl_mprintf("s%d: %s\n", shareret, curl_share_strerror(shareret)); | |
| @@ -56,5 +56,5 @@ static CURLcode test_lib1538(const char *URL) | |
| curl_mprintf("u%d: %s\n", urlret, curl_url_strerror(urlret)); | |
| } | |
| - | return res; |
| + | return result; |
| } | |
| @@ -83,7 +83,7 @@ static size_t t1540_write_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib1540(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct t1540_transfer_status st; | |
| start_test_timing(); | |
| @@ -111,12 +111,12 @@ static CURLcode test_lib1540(const char *URL) | |
| easy_setopt(curl, CURLOPT_DEBUGFUNCTION, libtest_debug_cb); | |
| easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; /* return the final return code */ |
| + | return result; /* return the final return code */ |
| } | |
| @@ -51,9 +51,9 @@ static void check_time(CURL *curl, int key, const char *name, | |
| const char *where) | |
| { | |
| curl_off_t tval; | |
| - | CURLcode res = curl_easy_getinfo(curl, (CURLINFO)key, &tval); |
| - | if(res) { |
| - | t1541_geterr(name, res, __LINE__); |
| + | CURLcode result = curl_easy_getinfo(curl, (CURLINFO)key, &tval); |
| + | if(result) { |
| + | t1541_geterr(name, result, __LINE__); |
| } | |
| else | |
| report_time(name, where, tval, tval > 0); | |
| @@ -63,9 +63,9 @@ static void check_time0(CURL *curl, int key, const char *name, | |
| const char *where) | |
| { | |
| curl_off_t tval; | |
| - | CURLcode res = curl_easy_getinfo(curl, (CURLINFO)key, &tval); |
| - | if(res) { |
| - | t1541_geterr(name, res, __LINE__); |
| + | CURLcode result = curl_easy_getinfo(curl, (CURLINFO)key, &tval); |
| + | if(result) { |
| + | t1541_geterr(name, result, __LINE__); |
| } | |
| else | |
| report_time(name, where, tval, !tval); | |
| @@ -107,7 +107,7 @@ static size_t t1541_write_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib1541(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct t1541_transfer_status st; | |
| start_test_timing(); | |
| @@ -127,7 +127,7 @@ static CURLcode test_lib1541(const char *URL) | |
| easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| check_time(curl, KN(CURLINFO_CONNECT_TIME_T), "done"); | |
| check_time(curl, KN(CURLINFO_PRETRANSFER_TIME_T), "done"); | |
| @@ -143,5 +143,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; /* return the final return code */ |
| + | return result; /* return the final return code */ |
| } | |
| @@ -37,7 +37,7 @@ | |
| static CURLcode test_lib1542(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -51,26 +51,26 @@ static CURLcode test_lib1542(const char *URL) | |
| easy_setopt(curl, CURLOPT_DEBUGFUNCTION, libtest_debug_cb); | |
| easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* CURLOPT_MAXLIFETIME_CONN is inclusive - the connection needs to be 2 | |
| * seconds old */ | |
| curlx_wait_ms(2000); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| easy_setopt(curl, CURLOPT_MAXLIFETIME_CONN, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| test_cleanup: | |
| @@ -78,5 +78,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1545(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct curl_httppost *lastptr = NULL; | |
| struct curl_httppost *m_formpost = NULL; | |
| @@ -48,5 +48,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -27,7 +27,7 @@ | |
| static CURLcode test_lib1549(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -46,14 +46,14 @@ static CURLcode test_lib1549(const char *URL) | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| test_setopt(curl, CURLOPT_COOKIEFILE, ""); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| - | if(!res) { |
| + | if(!result) { |
| /* extract all known cookies */ | |
| struct curl_slist *cookies = NULL; | |
| int num = 0; | |
| - | res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies); |
| - | if(!res && cookies) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies); |
| + | if(!result && cookies) { |
| /* a linked list of cookies in cookie file format */ | |
| struct curl_slist *each = cookies; | |
| while(each) { | |
| @@ -71,5 +71,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -28,7 +28,7 @@ | |
| static CURLcode test_lib1550(const char *URL) | |
| { | |
| CURLM *multi; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| static const char * const bl_servers[] = | |
| { "Microsoft-IIS/6.0", "nginx/0.8.54", NULL }; | |
| static const char * const bl_sites[] = | |
| @@ -28,7 +28,7 @@ | |
| static CURLcode test_lib1551(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| curl = curl_easy_init(); | |
| @@ -36,16 +36,16 @@ static CURLcode test_lib1551(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_URL, URL); | |
| curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); | |
| curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| curl_mfprintf(stderr, "****************************** Do it again\n"); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| } | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode test_lib1552(const char *URL) | |
| CURLM *multi = NULL; | |
| int still_running; | |
| CURLcode i = CURLE_OK; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLMsg *msg; | |
| int counter = 3; | |
| @@ -53,12 +53,12 @@ static CURLcode test_lib1552(const char *URL) | |
| abort_on_test_timeout(); | |
| while(still_running && counter--) { | |
| - | CURLMcode mres; |
| + | CURLMcode mresult; |
| int num; | |
| - | mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| - | if(mres != CURLM_OK) { |
| - | curl_mprintf("curl_multi_wait() returned %d\n", mres); |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | mresult = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| + | if(mresult != CURLM_OK) { |
| + | curl_mprintf("curl_multi_wait() returned %d\n", mresult); |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -83,8 +83,8 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | if(res) |
| - | i = res; |
| + | if(result) |
| + | i = result; |
| return i; /* return the final return code */ | |
| } | |
| @@ -44,7 +44,7 @@ static CURLcode test_lib1553(const char *URL) | |
| CURLM *multi = NULL; | |
| int still_running; | |
| CURLcode i = CURLE_OK; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| curl_mimepart *field = NULL; | |
| curl_mime *mime = NULL; | |
| int counter = 1; | |
| @@ -83,12 +83,12 @@ static CURLcode test_lib1553(const char *URL) | |
| abort_on_test_timeout(); | |
| while(still_running && counter--) { | |
| - | CURLMcode mres; |
| + | CURLMcode mresult; |
| int num; | |
| - | mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| - | if(mres != CURLM_OK) { |
| - | curl_mprintf("curl_multi_wait() returned %d\n", mres); |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | mresult = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| + | if(mresult != CURLM_OK) { |
| + | curl_mprintf("curl_multi_wait() returned %d\n", mresult); |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -107,8 +107,8 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | if(res) |
| - | i = res; |
| + | if(result) |
| + | i = result; |
| return i; /* return the final return code */ | |
| } | |
| @@ -56,7 +56,7 @@ static void t1554_test_unlock(CURL *curl, curl_lock_data data, void *useptr) | |
| /* test function */ | |
| static CURLcode test_lib1554(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLSH *share = NULL; | |
| int i; | |
| @@ -83,16 +83,16 @@ static CURLcode test_lib1554(const char *URL) | |
| /* use the share object */ | |
| curl_easy_setopt(curl, CURLOPT_SHARE, share); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| /* always cleanup */ | |
| curl_easy_cleanup(curl); | |
| /* Check for errors */ | |
| - | if(res != CURLE_OK) { |
| + | if(result != CURLE_OK) { |
| curl_mfprintf(stderr, "curl_easy_perform() failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| } | |
| @@ -102,5 +102,5 @@ test_cleanup: | |
| curl_share_cleanup(share); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -35,7 +35,7 @@ static int progressCallback(void *arg, | |
| double ultotal, | |
| double ulnow) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| char buffer[256]; | |
| size_t n = 0; | |
| (void)arg; | |
| @@ -43,17 +43,17 @@ static int progressCallback(void *arg, | |
| (void)dlnow; | |
| (void)ultotal; | |
| (void)ulnow; | |
| - | res = curl_easy_recv(t1555_curl, buffer, 256, &n); |
| - | curl_mprintf("curl_easy_recv returned %d\n", res); |
| - | res = curl_easy_send(t1555_curl, buffer, n, &n); |
| - | curl_mprintf("curl_easy_send returned %d\n", res); |
| + | result = curl_easy_recv(t1555_curl, buffer, 256, &n); |
| + | curl_mprintf("curl_easy_recv returned %d\n", result); |
| + | result = curl_easy_send(t1555_curl, buffer, n, &n); |
| + | curl_mprintf("curl_easy_send returned %d\n", result); |
| return 1; | |
| } | |
| static CURLcode test_lib1555(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -66,7 +66,7 @@ static CURLcode test_lib1555(const char *URL) | |
| easy_setopt(t1555_curl, CURLOPT_PROGRESSDATA, NULL); | |
| easy_setopt(t1555_curl, CURLOPT_NOPROGRESS, 0L); | |
| - | res = curl_easy_perform(t1555_curl); |
| + | result = curl_easy_perform(t1555_curl); |
| test_cleanup: | |
| @@ -75,5 +75,5 @@ test_cleanup: | |
| curl_easy_cleanup(t1555_curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -44,7 +44,7 @@ static CURLcode test_lib1556(const char *URL) | |
| { | |
| CURLcode code; | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct headerinfo info = { 0 }; | |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -61,7 +61,7 @@ static CURLcode test_lib1556(const char *URL) | |
| curl_mfprintf(stderr, "%s:%d curl_easy_perform() failed, " | |
| "with code %d (%s)\n", | |
| __FILE__, __LINE__, code, curl_easy_strerror(code)); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -72,5 +72,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode test_lib1557(const char *URL) | |
| CURL *curl1 = NULL; | |
| CURL *curl2 = NULL; | |
| int running_handles = 0; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -56,5 +56,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl2); | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1558(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| long protocol = 0; | |
| @@ -33,17 +33,17 @@ static CURLcode test_lib1558(const char *URL) | |
| easy_init(curl); | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_easy_perform() returned %d (%s)\n", | |
| - | res, curl_easy_strerror(res)); |
| + | result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| - | res = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); |
| - | if(res) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_easy_getinfo() returned %d (%s)\n", | |
| - | res, curl_easy_strerror(res)); |
| + | result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| @@ -59,5 +59,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; /* return the final return code */ |
| + | return result; /* return the final return code */ |
| } | |
| @@ -27,7 +27,7 @@ static CURLcode test_lib1559(const char *URL) | |
| { | |
| static const int EXCESSIVE = 10 * 1000 * 1000; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| char *longurl = NULL; | |
| CURLU *u; | |
| @@ -38,20 +38,20 @@ static CURLcode test_lib1559(const char *URL) | |
| longurl = curlx_malloc(EXCESSIVE); | |
| if(!longurl) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| memset(longurl, 'a', EXCESSIVE); | |
| longurl[EXCESSIVE - 1] = 0; | |
| - | res = curl_easy_setopt(curl, CURLOPT_URL, longurl); |
| + | result = curl_easy_setopt(curl, CURLOPT_URL, longurl); |
| curl_mprintf("CURLOPT_URL %d bytes URL == %d\n", | |
| - | EXCESSIVE, res); |
| + | EXCESSIVE, result); |
| - | res = curl_easy_setopt(curl, CURLOPT_POSTFIELDS, longurl); |
| + | result = curl_easy_setopt(curl, CURLOPT_POSTFIELDS, longurl); |
| curl_mprintf("CURLOPT_POSTFIELDS %d bytes data == %d\n", | |
| - | EXCESSIVE, res); |
| + | EXCESSIVE, result); |
| u = curl_url(); | |
| if(u) { | |
| @@ -72,5 +72,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; /* return the final return code */ |
| + | return result; /* return the final return code */ |
| } | |
| @@ -30,7 +30,7 @@ static CURLcode test_lib1564(const char *URL) | |
| CURLM *multi = NULL; | |
| int numfds; | |
| int i; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct curltime time_before_wait, time_after_wait; | |
| (void)URL; | |
| @@ -50,7 +50,7 @@ static CURLcode test_lib1564(const char *URL) | |
| if(curlx_timediff_ms(time_after_wait, time_before_wait) < 500) { | |
| curl_mfprintf(stderr, "%s:%d curl_multi_poll returned too early\n", | |
| __FILE__, __LINE__); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -67,7 +67,7 @@ static CURLcode test_lib1564(const char *URL) | |
| if(curlx_timediff_ms(time_after_wait, time_before_wait) > 500) { | |
| curl_mfprintf(stderr, "%s:%d curl_multi_poll returned too late\n", | |
| __FILE__, __LINE__); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -82,7 +82,7 @@ static CURLcode test_lib1564(const char *URL) | |
| if(curlx_timediff_ms(time_after_wait, time_before_wait) < 500) { | |
| curl_mfprintf(stderr, "%s:%d curl_multi_poll returned too early\n", | |
| __FILE__, __LINE__); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -100,7 +100,7 @@ static CURLcode test_lib1564(const char *URL) | |
| if(curlx_timediff_ms(time_after_wait, time_before_wait) > 500) { | |
| curl_mfprintf(stderr, "%s:%d curl_multi_poll returned too late\n", | |
| __FILE__, __LINE__); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -115,7 +115,7 @@ static CURLcode test_lib1564(const char *URL) | |
| if(curlx_timediff_ms(time_after_wait, time_before_wait) < 500) { | |
| curl_mfprintf(stderr, "%s:%d curl_multi_poll returned too early\n", | |
| __FILE__, __LINE__); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -126,5 +126,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -40,7 +40,7 @@ static const char *t1565_url; | |
| static void *t1565_run_thread(void *ptr) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int i; | |
| (void)ptr; | |
| @@ -76,7 +76,7 @@ test_cleanup: | |
| pthread_mutex_lock(&lock); | |
| if(!t1565_test_failure) | |
| - | t1565_test_failure = res; |
| + | t1565_test_failure = result; |
| pthread_mutex_unlock(&lock); | |
| @@ -88,8 +88,8 @@ static CURLcode test_lib1565(const char *URL) | |
| int still_running; | |
| int num; | |
| int i; | |
| - | int result; |
| - | CURLcode res = CURLE_OK; |
| + | int rc; |
| + | CURLcode result = CURLE_OK; |
| CURL *started_curls[CONN_NUM]; | |
| int started_num = 0; | |
| int finished_num = 0; | |
| @@ -105,12 +105,13 @@ static CURLcode test_lib1565(const char *URL) | |
| t1565_url = URL; | |
| - | result = pthread_create(&tid, NULL, t1565_run_thread, NULL); |
| - | if(!result) |
| + | rc = pthread_create(&tid, NULL, t1565_run_thread, NULL); |
| + | if(!rc) |
| tid_valid = true; | |
| else { | |
| curl_mfprintf(stderr, "%s:%d Could not create thread, errno %d\n", | |
| - | __FILE__, __LINE__, result); |
| + | __FILE__, __LINE__, rc); |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| @@ -121,8 +122,8 @@ static CURLcode test_lib1565(const char *URL) | |
| while((message = curl_multi_info_read(testmulti, &num))) { | |
| if(message->msg == CURLMSG_DONE) { | |
| - | res = message->data.result; |
| - | if(res) |
| + | result = message->data.result; |
| + | if(result) |
| goto test_cleanup; | |
| multi_remove_handle(testmulti, message->easy_handle); | |
| finished_num++; | |
| @@ -131,7 +132,7 @@ static CURLcode test_lib1565(const char *URL) | |
| curl_mfprintf(stderr, | |
| "%s:%d Got an unexpected message from curl: %i\n", | |
| __FILE__, __LINE__, message->msg); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -149,7 +150,7 @@ static CURLcode test_lib1565(const char *URL) | |
| while(pending_num > 0) { | |
| res_multi_add_handle(testmulti, pending_curls[pending_num - 1]); | |
| - | if(res) { |
| + | if(result) { |
| pthread_mutex_unlock(&lock); | |
| goto test_cleanup; | |
| } | |
| @@ -180,7 +181,7 @@ test_cleanup: | |
| pthread_mutex_lock(&lock); | |
| if(!t1565_test_failure) | |
| - | t1565_test_failure = res; |
| + | t1565_test_failure = result; |
| pthread_mutex_unlock(&lock); | |
| if(tid_valid) | |
| @@ -28,7 +28,7 @@ | |
| static CURLcode test_lib1567(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLU *u = NULL; | |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -40,12 +40,12 @@ static CURLcode test_lib1567(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| curl_url_set(u, CURLUPART_URL, URL, 0); | |
| curl_easy_setopt(curl, CURLOPT_CURLU, u); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| curl_mfprintf(stderr, "****************************** Do it again\n"); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| } | |
| } | |
| @@ -53,5 +53,5 @@ test_cleanup: | |
| curl_url_cleanup(u); | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,15 +25,15 @@ | |
| static CURLcode test_lib1568(const char *URL) | |
| { | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| CURL *curl; | |
| curl_off_t port; | |
| if(curlx_str_number(&libtest_arg2, &port, 0xffff)) | |
| - | return res; |
| + | return result; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) | |
| - | return res; |
| + | return result; |
| curl = curl_easy_init(); | |
| curl_easy_setopt(curl, CURLOPT_URL, URL); | |
| @@ -45,10 +45,10 @@ static CURLcode test_lib1568(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 50L); | |
| curl_easy_setopt(curl, CURLOPT_PORT, (long)port); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1569(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl; | |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -34,15 +34,15 @@ static CURLcode test_lib1569(const char *URL) | |
| easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| easy_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| curl_easy_setopt(curl, CURLOPT_URL, libtest_arg2); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1571(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -59,12 +59,12 @@ static CURLcode test_lib1571(const char *URL) | |
| test_setopt(curl, CURLOPT_FOLLOWLOCATION, CURLFOLLOW_OBEYCODE); | |
| } | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -47,7 +47,7 @@ static int t1576_seek_callback(void *ptr, curl_off_t offset, int origin) | |
| static CURLcode test_lib1576(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| struct curl_slist *pHeaderList = NULL; | |
| @@ -82,12 +82,12 @@ static CURLcode test_lib1576(const char *URL) | |
| pHeaderList = curl_slist_append(pHeaderList, "Expect:"); | |
| curl_easy_setopt(curl, CURLOPT_HTTPHEADER, pHeaderList); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| curl_slist_free_all(pHeaderList); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1582(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -48,11 +48,11 @@ static CURLcode test_lib1582(const char *URL) | |
| test_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); | |
| test_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -75,7 +75,7 @@ static int t1591_trailers_callback(struct curl_slist **list, void *userdata) | |
| static CURLcode test_lib1591(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_FAILED_INIT; |
| + | CURLcode result = CURLE_FAILED_INIT; |
| /* http and proxy header list */ | |
| struct curl_slist *hhl = NULL; | |
| @@ -104,7 +104,7 @@ static CURLcode test_lib1591(const char *URL) | |
| test_setopt(curl, CURLOPT_TRAILERFUNCTION, t1591_trailers_callback); | |
| test_setopt(curl, CURLOPT_TRAILERDATA, NULL); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -114,5 +114,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -43,8 +43,8 @@ static CURLcode test_lib1592(const char *URL) | |
| int stillRunning; | |
| CURLM *multi = NULL; | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| - | CURLMcode mres; |
| + | CURLcode result = CURLE_OK; |
| + | CURLMcode mresult; |
| long timeout; | |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -98,11 +98,11 @@ static CURLcode test_lib1592(const char *URL) | |
| /* Start measuring how long it takes to remove the handle. */ | |
| curl_mfprintf(stderr, "curl_multi_remove_handle()...\n"); | |
| start_test_timing(); | |
| - | mres = curl_multi_remove_handle(multi, curl); |
| - | if(mres) { |
| - | curl_mfprintf(stderr, |
| - | "curl_multi_remove_handle() failed, with code %d\n", mres); |
| - | res = TEST_ERR_MULTI; |
| + | mresult = curl_multi_remove_handle(multi, curl); |
| + | if(mresult) { |
| + | curl_mfprintf(stderr, "curl_multi_remove_handle() failed, with code %d\n", |
| + | mresult); |
| + | result = TEST_ERR_MULTI; |
| goto test_cleanup; | |
| } | |
| curl_mfprintf(stderr, "curl_multi_remove_handle() succeeded\n"); | |
| @@ -117,5 +117,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -31,7 +31,7 @@ static CURLcode test_lib1593(const char *URL) | |
| struct curl_slist *header = NULL; | |
| long unmet; | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -44,14 +44,14 @@ static CURLcode test_lib1593(const char *URL) | |
| header = curl_slist_append(NULL, "If-Modified-Since:"); | |
| if(!header) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| easy_setopt(curl, CURLOPT_HTTPHEADER, header); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* Confirm that the condition checking still worked, even though we | |
| @@ -59,12 +59,12 @@ static CURLcode test_lib1593(const char *URL) | |
| * The server returns 304, which means the condition is "unmet". | |
| */ | |
| - | res = curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet); |
| - | if(res) |
| + | result = curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet); |
| + | if(result) |
| goto test_cleanup; | |
| if(unmet != 1L) { | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| @@ -75,5 +75,5 @@ test_cleanup: | |
| curl_slist_free_all(header); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -31,7 +31,7 @@ static CURLcode test_lib1594(const char *URL) | |
| struct curl_slist *header = NULL; | |
| curl_off_t retry; | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -39,12 +39,12 @@ static CURLcode test_lib1594(const char *URL) | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| - | res = curl_easy_getinfo(curl, CURLINFO_RETRY_AFTER, &retry); |
| - | if(res) |
| + | result = curl_easy_getinfo(curl, CURLINFO_RETRY_AFTER, &retry); |
| + | if(result) |
| goto test_cleanup; | |
| curl_mprintf("Retry-After %" CURL_FORMAT_CURL_OFF_T "\n", retry); | |
| @@ -56,5 +56,5 @@ test_cleanup: | |
| curl_slist_free_all(header); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -34,7 +34,7 @@ struct pair { | |
| static CURLcode test_lib1597(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| curl_version_info_data *curlinfo; | |
| const char * const *proto; | |
| int n; | |
| @@ -74,7 +74,7 @@ static CURLcode test_lib1597(const char *URL) | |
| curlinfo = curl_version_info(CURLVERSION_NOW); | |
| if(!curlinfo) { | |
| fputs("curl_version_info failed\n", stderr); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| @@ -82,7 +82,7 @@ static CURLcode test_lib1597(const char *URL) | |
| for(proto = curlinfo->protocols; *proto; proto++) { | |
| if((size_t)n >= sizeof(protolist)) { | |
| puts("protolist buffer too small\n"); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| n += curl_msnprintf(protolist + n, sizeof(protolist) - n, ",%s", *proto); | |
| @@ -94,9 +94,9 @@ static CURLcode test_lib1597(const char *URL) | |
| /* Run the tests. */ | |
| for(i = 0; prots[i].in; i++) { | |
| - | res = curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, prots[i].in); |
| - | if(res != *prots[i].exp) { |
| - | curl_mprintf("unexpectedly '%s' returned %d\n", prots[i].in, res); |
| + | result = curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, prots[i].in); |
| + | if(result != *prots[i].exp) { |
| + | curl_mprintf("unexpectedly '%s' returned %d\n", prots[i].in, result); |
| break; | |
| } | |
| } | |
| @@ -106,5 +106,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -55,7 +55,7 @@ static CURLcode test_lib1598(const char *URL) | |
| static const char *post_data = "xxx=yyy&aaa=bbbbb"; | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_FAILED_INIT; |
| + | CURLcode result = CURLE_FAILED_INIT; |
| /* http and proxy header list */ | |
| struct curl_slist *hhl = NULL, *list; | |
| @@ -90,7 +90,7 @@ static CURLcode test_lib1598(const char *URL) | |
| test_setopt(curl, CURLOPT_TRAILERDATA, NULL); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -100,5 +100,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1599(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| curl = curl_easy_init(); | |
| @@ -36,9 +36,9 @@ static CURLcode test_lib1599(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_REQUIRED); | |
| curl_easy_setopt(curl, CURLOPT_NETRC_FILE, libtest_arg2); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| curl_easy_cleanup(curl); | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -48,7 +48,7 @@ static size_t t1662_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib1662(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl; | |
| curl_mime *mime1; | |
| curl_mimepart *part1; | |
| @@ -77,12 +77,12 @@ static CURLcode test_lib1662(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, 1L); | |
| curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| } | |
| } | |
| curl_easy_cleanup(curl); | |
| curl_mime_free(mime1); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1900(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl1 = NULL; | |
| CURL *curl2 = NULL; | |
| @@ -47,5 +47,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl1); | |
| curl_easy_cleanup(curl2); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -48,7 +48,7 @@ static size_t t1901_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) | |
| static CURLcode test_lib1901(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct curl_slist *chunk = NULL; | |
| curl_global_init(CURL_GLOBAL_ALL); | |
| @@ -76,12 +76,12 @@ static CURLcode test_lib1901(const char *URL) | |
| easy_setopt(curl, CURLOPT_HTTPHEADER, n); | |
| } | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| } | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_slist_free_all(chunk); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1902(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl; | |
| curl_global_init(CURL_GLOBAL_ALL); | |
| @@ -42,5 +42,5 @@ static CURLcode test_lib1902(const char *URL) | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1903(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -33,8 +33,8 @@ static CURLcode test_lib1903(const char *URL) | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| easy_setopt(curl, CURLOPT_COOKIEFILE, libtest_arg2); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| curl_easy_reset(curl); | |
| @@ -42,11 +42,11 @@ static CURLcode test_lib1903(const char *URL) | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| easy_setopt(curl, CURLOPT_COOKIEFILE, libtest_arg2); | |
| easy_setopt(curl, CURLOPT_COOKIEJAR, libtest_arg3); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1906(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| char *url_after = NULL; | |
| CURLU *curlu = curl_url(); | |
| char error_buffer[CURL_ERROR_SIZE] = ""; | |
| @@ -41,16 +41,16 @@ static CURLcode test_lib1906(const char *URL) | |
| easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, 5000L); | |
| /* set a port number that makes this request fail */ | |
| easy_setopt(curl, CURLOPT_PORT, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_COULDNT_CONNECT && res != CURLE_OPERATION_TIMEDOUT) { |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_COULDNT_CONNECT && result != CURLE_OPERATION_TIMEDOUT) { |
| curl_mfprintf(stderr, "failure expected, " | |
| "curl_easy_perform returned %d: <%s>, <%s>\n", | |
| - | res, curl_easy_strerror(res), error_buffer); |
| - | if(res == CURLE_OK) |
| - | res = TEST_ERR_MAJOR_BAD; /* force an error return */ |
| + | result, curl_easy_strerror(result), error_buffer); |
| + | if(result == CURLE_OK) |
| + | result = TEST_ERR_MAJOR_BAD; /* force an error return */ |
| goto test_cleanup; | |
| } | |
| - | res = CURLE_OK; /* reset for next use */ |
| + | result = CURLE_OK; /* reset for next use */ |
| /* print the used URL */ | |
| curl_url_get(curlu, CURLUPART_URL, &url_after, 0); | |
| @@ -61,11 +61,11 @@ static CURLcode test_lib1906(const char *URL) | |
| /* now reset CURLOP_PORT to go back to originally set port number */ | |
| easy_setopt(curl, CURLOPT_PORT, 0L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| curl_mfprintf(stderr, "success expected, " | |
| "curl_easy_perform returned %d: <%s>, <%s>\n", | |
| - | res, curl_easy_strerror(res), error_buffer); |
| + | result, curl_easy_strerror(result), error_buffer); |
| /* print URL */ | |
| curl_url_get(curlu, CURLUPART_URL, &url_after, 0); | |
| @@ -77,5 +77,5 @@ test_cleanup: | |
| curl_url_cleanup(curlu); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -27,7 +27,7 @@ static CURLcode test_lib1907(const char *URL) | |
| { | |
| char *url_after; | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| char error_buffer[CURL_ERROR_SIZE] = ""; | |
| curl_global_init(CURL_GLOBAL_DEFAULT); | |
| @@ -35,11 +35,11 @@ static CURLcode test_lib1907(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_URL, URL); | |
| curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error_buffer); | |
| curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(!res) |
| + | result = curl_easy_perform(curl); |
| + | if(!result) |
| curl_mfprintf(stderr, "failure expected, " | |
| "curl_easy_perform returned %d: <%s>, <%s>\n", | |
| - | res, curl_easy_strerror(res), error_buffer); |
| + | result, curl_easy_strerror(result), error_buffer); |
| /* print the used URL */ | |
| if(!curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url_after)) | |
| @@ -48,5 +48,5 @@ static CURLcode test_lib1907(const char *URL) | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1908(const char *URL) | |
| { | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| CURL *curl; | |
| start_test_timing(); | |
| @@ -36,13 +36,13 @@ static CURLcode test_lib1908(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_URL, URL); | |
| curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L); | |
| curl_easy_setopt(curl, CURLOPT_ALTSVC, libtest_arg2); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| - | if(!res) { |
| + | if(!result) { |
| /* make a copy and check that this also has alt-svc activated */ | |
| CURL *curldupe = curl_easy_duphandle(curl); | |
| if(curldupe) { | |
| - | res = curl_easy_perform(curldupe); |
| + | result = curl_easy_perform(curldupe); |
| /* we close the second handle first, which makes it store the alt-svc | |
| file only to get overwritten when the next handle is closed! */ | |
| curl_easy_cleanup(curldupe); | |
| @@ -56,5 +56,5 @@ static CURLcode test_lib1908(const char *URL) | |
| curl_easy_cleanup(curl); | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1910(const char *URL) | |
| { | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| CURL *curl; | |
| start_test_timing(); | |
| @@ -37,9 +37,9 @@ static CURLcode test_lib1910(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L); | |
| curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); | |
| curl_easy_setopt(curl, CURLOPT_USERPWD, "user\nname:pass\nword"); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| curl_easy_cleanup(curl); | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -51,7 +51,7 @@ static CURLcode test_lib1911(const char *URL) | |
| for(o = curl_easy_option_next(NULL); o; o = curl_easy_option_next(o)) { | |
| if(o->type == CURLOT_STRING) { | |
| - | CURLcode res; |
| + | CURLcode result; |
| /* | |
| * Whitelist string options that are safe for abuse | |
| */ | |
| @@ -68,8 +68,8 @@ static CURLcode test_lib1911(const char *URL) | |
| /* This is a string. Make sure that passing in a string longer | |
| CURL_MAX_INPUT_LENGTH returns an error */ | |
| - | res = curl_easy_setopt(curl, o->id, testbuf); |
| - | switch(res) { |
| + | result = curl_easy_setopt(curl, o->id, testbuf); |
| + | switch(result) { |
| case CURLE_BAD_FUNCTION_ARGUMENT: /* the most normal */ | |
| case CURLE_UNKNOWN_OPTION: /* left out from the build */ | |
| case CURLE_NOT_BUILT_IN: /* not supported */ | |
| @@ -78,7 +78,7 @@ static CURLcode test_lib1911(const char *URL) | |
| default: | |
| /* all other return codes are unexpected */ | |
| curl_mfprintf(stderr, "curl_easy_setopt(%s...) returned %d\n", | |
| - | o->name, res); |
| + | o->name, result); |
| error++; | |
| break; | |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1913(const char *URL) | |
| { | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| CURL *curl; | |
| start_test_timing(); | |
| @@ -38,9 +38,9 @@ static CURLcode test_lib1913(const char *URL) | |
| if(libtest_arg2) | |
| /* test1914 sets this extra arg */ | |
| curl_easy_setopt(curl, CURLOPT_FILETIME, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| curl_easy_cleanup(curl); | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -95,7 +95,7 @@ static CURLSTScode hstswrite(CURL *curl, struct curl_hstsentry *e, | |
| static CURLcode test_lib1915(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl; | |
| struct state st = { 0 }; | |
| @@ -115,13 +115,13 @@ static CURLcode test_lib1915(const char *URL) | |
| easy_setopt(curl, CURLOPT_DEBUGDATA, &debug_config); | |
| easy_setopt(curl, CURLOPT_DEBUGFUNCTION, libtest_debug_cb); | |
| easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| curl_easy_cleanup(curl); | |
| curl = NULL; | |
| - | if(res == CURLE_OPERATION_TIMEDOUT) /* we expect that on Windows */ |
| - | res = CURLE_COULDNT_CONNECT; |
| - | curl_mprintf("First request returned %d\n", res); |
| - | res = CURLE_OK; |
| + | if(result == CURLE_OPERATION_TIMEDOUT) /* we expect that on Windows */ |
| + | result = CURLE_COULDNT_CONNECT; |
| + | curl_mprintf("First request returned %d\n", result); |
| + | result = CURLE_OK; |
| easy_init(curl); | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| @@ -134,13 +134,13 @@ static CURLcode test_lib1915(const char *URL) | |
| easy_setopt(curl, CURLOPT_DEBUGDATA, &debug_config); | |
| easy_setopt(curl, CURLOPT_DEBUGFUNCTION, libtest_debug_cb); | |
| easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| curl_easy_cleanup(curl); | |
| curl = NULL; | |
| - | curl_mprintf("Second request returned %d\n", res); |
| + | curl_mprintf("Second request returned %d\n", result); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1916(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -43,12 +43,12 @@ static CURLcode test_lib1916(const char *URL) | |
| else { | |
| curl_easy_setopt(curl, CURLOPT_POSTFIELDS, ""); | |
| } | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| - | curl_mprintf("res: %d\n", res); |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| + | curl_mprintf("result: %d\n", result); |
| } | |
| curl_easy_cleanup(curl); | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1919(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl; | |
| int i; | |
| @@ -40,13 +40,13 @@ static CURLcode test_lib1919(const char *URL) | |
| for(i = 0; i < 2; i++) { | |
| /* the second request needs to do connection reuse */ | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| } | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1933(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *connect_to = NULL; | |
| struct curl_slist *list = NULL; | |
| @@ -53,7 +53,7 @@ static CURLcode test_lib1933(const char *URL) | |
| list = curl_slist_append(list, "Content-Type: application/json"); | |
| test_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -62,5 +62,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1934(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *connect_to = NULL; | |
| struct curl_slist *list = NULL; | |
| @@ -54,7 +54,7 @@ static CURLcode test_lib1934(const char *URL) | |
| list = curl_slist_append(list, "Content-Type: application/json"); | |
| test_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -63,5 +63,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1935(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *connect_to = NULL; | |
| struct curl_slist *list = NULL; | |
| @@ -54,7 +54,7 @@ static CURLcode test_lib1935(const char *URL) | |
| list = curl_slist_append(list, "Content-Type: application/json"); | |
| test_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -63,5 +63,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1936(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *connect_to = NULL; | |
| struct curl_slist *list = NULL; | |
| @@ -54,7 +54,7 @@ static CURLcode test_lib1936(const char *URL) | |
| list = curl_slist_append(list, "Content-Type: application/json"); | |
| test_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -63,5 +63,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1937(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *connect_to = NULL; | |
| struct curl_slist *list = NULL; | |
| @@ -56,7 +56,7 @@ static CURLcode test_lib1937(const char *URL) | |
| test_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| test_setopt(curl, CURLOPT_POSTFIELDS, "postData"); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -65,5 +65,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1938(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *connect_to = NULL; | |
| struct curl_slist *list = NULL; | |
| unsigned char data[] = { 0x70, 0x6f, 0x73, 0x74, 0, 0x44, 0x61, 0x74, 0x61 }; | |
| @@ -58,7 +58,7 @@ static CURLcode test_lib1938(const char *URL) | |
| test_setopt(curl, CURLOPT_POSTFIELDS, data); | |
| test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)sizeof(data)); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -67,5 +67,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -36,7 +36,7 @@ static CURLcode test_lib1939(const char *URL) | |
| curl = curl_easy_init(); | |
| if(curl) { | |
| CURLcode c; | |
| - | CURLMcode m; |
| + | CURLMcode mresult; |
| /* Crash only happens when using HTTPS */ | |
| c = curl_easy_setopt(curl, CURLOPT_URL, URL); | |
| @@ -48,14 +48,14 @@ static CURLcode test_lib1939(const char *URL) | |
| /* We are going to drive the transfer using multi interface here, | |
| because we want to stop during the middle. */ | |
| - | m = curl_multi_add_handle(multi, curl); |
| + | mresult = curl_multi_add_handle(multi, curl); |
| - | if(!m) |
| + | if(!mresult) |
| /* Run the multi handle once, just enough to start establishing an | |
| HTTPS connection. */ | |
| - | m = curl_multi_perform(multi, &running_handles); |
| + | mresult = curl_multi_perform(multi, &running_handles); |
| - | if(m) |
| + | if(mresult) |
| curl_mfprintf(stderr, "curl_multi_perform failed\n"); | |
| } | |
| /* Close the easy handle *before* the multi handle. Doing it the other | |
| @@ -78,7 +78,7 @@ static void t1940_showem(CURL *curl, int header_request, unsigned int type) | |
| static CURLcode test_lib1940(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int header_request; | |
| if(testnum == 1946) { | |
| @@ -101,8 +101,8 @@ static CURLcode test_lib1940(const char *URL) | |
| easy_setopt(curl, CURLOPT_PROXY, libtest_arg2); | |
| easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L); | |
| } | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| t1940_showem(curl, header_request, CURLH_HEADER); | |
| @@ -116,5 +116,5 @@ static CURLcode test_lib1940(const char *URL) | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -47,7 +47,7 @@ static size_t t1945_write_cb(char *data, size_t n, size_t l, void *userp) | |
| static CURLcode test_lib1945(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_DEFAULT); | |
| @@ -63,14 +63,14 @@ static CURLcode test_lib1945(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg2); | |
| curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L); | |
| } | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| - | curl_mprintf("badness: %d\n", res); |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| + | curl_mprintf("badness: %d\n", result); |
| } | |
| t1945_showem(curl, CURLH_CONNECT | CURLH_HEADER | CURLH_TRAILER | CURLH_1XX); | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -34,7 +34,7 @@ static size_t t1947_write_cb(char *data, size_t n, size_t l, void *userp) | |
| static CURLcode test_lib1947(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct curl_header *h; | |
| int count = 0; | |
| unsigned int origins; | |
| @@ -47,10 +47,10 @@ static CURLcode test_lib1947(const char *URL) | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| easy_setopt(curl, CURLOPT_WRITEFUNCTION, t1947_write_cb); | |
| easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_easy_perform() failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| @@ -67,10 +67,10 @@ static CURLcode test_lib1947(const char *URL) | |
| /* perform another request - without redirect */ | |
| easy_setopt(curl, CURLOPT_URL, libtest_arg2); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_easy_perform() failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| @@ -86,5 +86,5 @@ static CURLcode test_lib1947(const char *URL) | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -42,7 +42,7 @@ static size_t put_callback(char *ptr, size_t size, size_t nmemb, void *stream) | |
| static CURLcode test_lib1948(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| static const char *testput = "This is test PUT data\n"; | |
| struct put_buffer pbuf; | |
| @@ -59,18 +59,18 @@ static CURLcode test_lib1948(const char *URL) | |
| easy_setopt(curl, CURLOPT_READDATA, &pbuf); | |
| easy_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(testput)); | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* POST */ | |
| easy_setopt(curl, CURLOPT_POST, 1L); | |
| easy_setopt(curl, CURLOPT_POSTFIELDS, testput); | |
| easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(testput)); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1955(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *list = NULL; | |
| struct curl_slist *connect_to = NULL; | |
| @@ -75,7 +75,7 @@ static CURLcode test_lib1955(const char *URL) | |
| curl_slist_append(list, "tesMixCase: MixCase"); | |
| test_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -84,5 +84,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1956(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *list = NULL; | |
| struct curl_slist *connect_to = NULL; | |
| @@ -58,7 +58,7 @@ static CURLcode test_lib1956(const char *URL) | |
| "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"); | |
| test_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -67,5 +67,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1957(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *list = NULL; | |
| struct curl_slist *connect_to = NULL; | |
| @@ -57,7 +57,7 @@ static CURLcode test_lib1957(const char *URL) | |
| curl_slist_append(list, "X-Xxx-Content-Sha256: arbitrary"); | |
| test_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -66,5 +66,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1958(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *list = NULL; | |
| struct curl_slist *connect_to = NULL; | |
| @@ -57,7 +57,7 @@ static CURLcode test_lib1958(const char *URL) | |
| curl_slist_append(list, "X-Xxx-Content-Sha256: \tarbitrary "); | |
| test_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -66,5 +66,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1959(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *list = NULL; | |
| struct curl_slist *connect_to = NULL; | |
| @@ -59,7 +59,7 @@ static CURLcode test_lib1959(const char *URL) | |
| "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"); | |
| test_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -68,5 +68,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -72,7 +72,7 @@ static int sockopt_cb(void *clientp, | |
| static CURLcode test_lib1960(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| int status; | |
| curl_socket_t client_fd = CURL_SOCKET_BAD; | |
| struct sockaddr_in serv_addr; | |
| @@ -82,11 +82,11 @@ static CURLcode test_lib1960(const char *URL) | |
| return CURLE_OK; /* no output makes it not skipped */ | |
| if(curlx_str_number(&libtest_arg3, &port, 0xffff)) | |
| - | return res; |
| + | return result; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| - | return res; |
| + | return result; |
| } | |
| /* | |
| @@ -132,7 +132,7 @@ static CURLcode test_lib1960(const char *URL) | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| @@ -140,7 +140,7 @@ test_cleanup: | |
| sclose(client_fd); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| #else | |
| static CURLcode test_lib1960(const char *URL) | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1964(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct curl_slist *connect_to = NULL; | |
| struct curl_slist *list = NULL, *tmp; | |
| @@ -39,7 +39,7 @@ static CURLcode test_lib1964(const char *URL) | |
| if(libtest_arg2) { | |
| connect_to = curl_slist_append(connect_to, libtest_arg2); | |
| if(!connect_to) { | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| } | |
| @@ -47,13 +47,13 @@ static CURLcode test_lib1964(const char *URL) | |
| list = curl_slist_append(list, "Content-Type: application/json"); | |
| tmp = curl_slist_append(list, "X-Xxx-Date: 19700101T000000Z"); | |
| if(!list || !tmp) { | |
| - | res = CURLE_FAILED_INIT; |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| list = tmp; | |
| easy_setopt(curl, CURLOPT_HTTPHEADER, list); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -62,5 +62,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1970(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *list = NULL; | |
| struct curl_slist *connect_to = NULL; | |
| @@ -58,7 +58,7 @@ static CURLcode test_lib1970(const char *URL) | |
| } | |
| test_setopt(curl, CURLOPT_CONNECT_TO, connect_to); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -67,5 +67,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -35,7 +35,7 @@ static size_t t1971_read_cb(char *ptr, size_t size, size_t nitems, void *userp) | |
| static CURLcode test_lib1971(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *list = NULL; | |
| struct curl_slist *connect_to = NULL; | |
| @@ -67,7 +67,7 @@ static CURLcode test_lib1971(const char *URL) | |
| } | |
| test_setopt(curl, CURLOPT_CONNECT_TO, connect_to); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -76,5 +76,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -28,7 +28,7 @@ static CURLcode test_lib1972(const char *URL) | |
| CURL *curl; | |
| curl_mime *mime = NULL; | |
| curl_mimepart *part = NULL; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *list = NULL; | |
| struct curl_slist *connect_to = NULL; | |
| @@ -68,7 +68,7 @@ static CURLcode test_lib1972(const char *URL) | |
| } | |
| test_setopt(curl, CURLOPT_CONNECT_TO, connect_to); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -78,5 +78,5 @@ test_cleanup: | |
| curl_mime_free(mime); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1973(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *list = NULL; | |
| struct curl_slist *connect_to = NULL; | |
| @@ -57,7 +57,7 @@ static CURLcode test_lib1973(const char *URL) | |
| } | |
| test_setopt(curl, CURLOPT_CONNECT_TO, connect_to); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -66,5 +66,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1974(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *connect_to = NULL; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -51,7 +51,7 @@ static CURLcode test_lib1974(const char *URL) | |
| } | |
| test_setopt(curl, CURLOPT_CONNECT_TO, connect_to); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -59,5 +59,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -35,7 +35,7 @@ static size_t t1975_read_cb(char *ptr, size_t size, size_t nitems, void *userp) | |
| static CURLcode test_lib1975(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *list = NULL; | |
| struct curl_slist *connect_to = NULL; | |
| @@ -69,7 +69,7 @@ static CURLcode test_lib1975(const char *URL) | |
| } | |
| test_setopt(curl, CURLOPT_CONNECT_TO, connect_to); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -78,5 +78,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib1977(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLU *curlu = curl_url(); | |
| CURLU *curlu_2 = curl_url(); | |
| CURL *curl; | |
| @@ -38,13 +38,13 @@ static CURLcode test_lib1977(const char *URL) | |
| curl_url_set(curlu, CURLUPART_URL, URL, CURLU_DEFAULT_SCHEME); | |
| easy_setopt(curl, CURLOPT_CURLU, curlu); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| effective = NULL; | |
| - | res = curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective); |
| - | if(res) |
| + | result = curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective); |
| + | if(result) |
| goto test_cleanup; | |
| curl_mprintf("effective URL: %s\n", effective); | |
| @@ -53,13 +53,13 @@ static CURLcode test_lib1977(const char *URL) | |
| curl_url_set(curlu_2, CURLUPART_QUERY, "foo", 0); | |
| easy_setopt(curl, CURLOPT_CURLU, curlu_2); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| effective = NULL; | |
| - | res = curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective); |
| - | if(res) |
| + | result = curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective); |
| + | if(result) |
| goto test_cleanup; | |
| curl_mprintf("effective URL: %s\n", effective); | |
| @@ -69,13 +69,13 @@ static CURLcode test_lib1977(const char *URL) | |
| CURLOPT_CURLU again */ | |
| curl_url_set(curlu_2, CURLUPART_QUERY, "bar", CURLU_APPENDQUERY); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| effective = NULL; | |
| - | res = curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective); |
| - | if(res) |
| + | result = curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective); |
| + | if(result) |
| goto test_cleanup; | |
| curl_mprintf("effective URL: %s\n", effective); | |
| @@ -85,5 +85,5 @@ test_cleanup: | |
| curl_url_cleanup(curlu_2); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib1978(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| struct curl_slist *connect_to = NULL; | |
| struct curl_slist *list = NULL; | |
| @@ -90,7 +90,7 @@ static CURLcode test_lib1978(const char *URL) | |
| } | |
| test_setopt(curl, CURLOPT_CONNECT_TO, connect_to); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -99,5 +99,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -31,7 +31,7 @@ | |
| static CURLcode send_request(CURL *curl, const char *url, int seq, | |
| long auth_scheme, const char *userpwd) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| size_t len = strlen(url) + 4 + 1; | |
| char *full_url = curlx_malloc(len); | |
| if(!full_url) { | |
| @@ -49,11 +49,11 @@ static CURLcode send_request(CURL *curl, const char *url, int seq, | |
| test_setopt(curl, CURLOPT_USERPWD, userpwd); | |
| test_setopt(curl, CURLOPT_HTTPAUTH, auth_scheme); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curlx_free(full_url); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode send_wrong_password(CURL *curl, const char *url, int seq, | |
| @@ -83,7 +83,7 @@ static long parse_auth_name(const char *arg) | |
| static CURLcode test_lib2023(const char *URL) /* libauthretry */ | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl = NULL; | |
| long main_auth_scheme = parse_auth_name(libtest_arg2); | |
| @@ -109,12 +109,12 @@ static CURLcode test_lib2023(const char *URL) /* libauthretry */ | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | res = send_wrong_password(curl, URL, 100, main_auth_scheme); |
| - | if(res != CURLE_OK) |
| + | result = send_wrong_password(curl, URL, 100, main_auth_scheme); |
| + | if(result != CURLE_OK) |
| goto test_cleanup; | |
| - | res = send_right_password(curl, URL, 200, fallback_auth_scheme); |
| - | if(res != CURLE_OK) |
| + | result = send_right_password(curl, URL, 200, fallback_auth_scheme); |
| + | if(result != CURLE_OK) |
| goto test_cleanup; | |
| curl_easy_cleanup(curl); | |
| @@ -127,16 +127,16 @@ static CURLcode test_lib2023(const char *URL) /* libauthretry */ | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | res = send_wrong_password(curl, URL, 300, main_auth_scheme); |
| - | if(res != CURLE_OK) |
| + | result = send_wrong_password(curl, URL, 300, main_auth_scheme); |
| + | if(result != CURLE_OK) |
| goto test_cleanup; | |
| - | res = send_wrong_password(curl, URL, 400, fallback_auth_scheme); |
| - | if(res != CURLE_OK) |
| + | result = send_wrong_password(curl, URL, 400, fallback_auth_scheme); |
| + | if(result != CURLE_OK) |
| goto test_cleanup; | |
| - | res = send_right_password(curl, URL, 500, fallback_auth_scheme); |
| - | if(res != CURLE_OK) |
| + | result = send_right_password(curl, URL, 500, fallback_auth_scheme); |
| + | if(result != CURLE_OK) |
| goto test_cleanup; | |
| test_cleanup: | |
| @@ -144,5 +144,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -83,7 +83,7 @@ static CURLcode test_lib2032(const char *URL) /* libntlmconnect */ | |
| NoMoreHandles | |
| }; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLM *multi = NULL; | |
| int running; | |
| int i; | |
| @@ -105,9 +105,9 @@ static CURLcode test_lib2032(const char *URL) /* libntlmconnect */ | |
| } | |
| res_global_init(CURL_GLOBAL_ALL); | |
| - | if(res) { |
| + | if(result) { |
| curlx_free(full_url); | |
| - | return res; |
| + | return result; |
| } | |
| multi_init(multi); | |
| @@ -147,7 +147,7 @@ static CURLcode test_lib2032(const char *URL) /* libntlmconnect */ | |
| multi_add_handle(multi, ntlm_curls[num_handles]); | |
| num_handles += 1; | |
| state = NeedSocketForNewHandle; | |
| - | res = ntlmcb_res; |
| + | result = ntlmcb_res; |
| } | |
| multi_perform(multi, &running); | |
| @@ -229,5 +229,5 @@ test_cleanup: | |
| curlx_free(full_url); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -53,7 +53,7 @@ static int prereq_callback(void *clientp, | |
| static CURLcode test_lib2082(const char *URL) /* libprereq */ | |
| { | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| CURL *curl = NULL; | |
| struct prcs prereq_cb; | |
| @@ -84,11 +84,11 @@ static CURLcode test_lib2082(const char *URL) /* libprereq */ | |
| curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); | |
| } | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_perform() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| } | |
| @@ -97,5 +97,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -55,10 +55,10 @@ static size_t t2301_write_cb(char *b, size_t size, size_t nitems, void *p) | |
| curl_mfprintf(stderr, "\n"); | |
| (void)size; | |
| if(buffer[0] == 0x89) { | |
| - | CURLcode res; |
| + | CURLcode result; |
| curl_mfprintf(stderr, "send back a simple PONG\n"); | |
| - | res = curl_ws_send(curl, pong, 2, &sent, 0, 0); |
| - | if(res) |
| + | result = curl_ws_send(curl, pong, 2, &sent, 0, 0); |
| + | if(result) |
| nitems = 0; | |
| } | |
| if(nitems != incoming) | |
| @@ -71,7 +71,7 @@ static CURLcode test_lib2301(const char *URL) | |
| { | |
| #ifndef CURL_DISABLE_WEBSOCKETS | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -85,17 +85,17 @@ static CURLcode test_lib2301(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_WS_OPTIONS, CURLWS_RAW_MODE); | |
| curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, t2301_write_cb); | |
| curl_easy_setopt(curl, CURLOPT_WRITEDATA, curl); | |
| - | res = curl_easy_perform(curl); |
| - | curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", res); |
| + | result = curl_easy_perform(curl); |
| + | curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", result); |
| #if 0 | |
| - | if(res == CURLE_OK) |
| + | if(result == CURLE_OK) |
| t2301_websocket(curl); | |
| #endif | |
| /* always cleanup */ | |
| curl_easy_cleanup(curl); | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| #else | |
| NO_SUPPORT_BUILT_IN | |
| #endif | |
| @@ -96,7 +96,7 @@ static CURLcode test_lib2302(const char *URL) | |
| { | |
| #ifndef CURL_DISABLE_WEBSOCKETS | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct ws_data ws_data; | |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -114,8 +114,8 @@ static CURLcode test_lib2302(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, t2302_write_cb); | |
| curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ws_data); | |
| - | res = curl_easy_perform(curl); |
| - | curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", res); |
| + | result = curl_easy_perform(curl); |
| + | curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", result); |
| /* always cleanup */ | |
| curl_easy_cleanup(curl); | |
| flush_data(&ws_data); | |
| @@ -123,7 +123,7 @@ static CURLcode test_lib2302(const char *URL) | |
| curlx_free(ws_data.buf); | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| #else | |
| NO_SUPPORT_BUILT_IN | |
| #endif | |
| @@ -29,9 +29,9 @@ static CURLcode recv_any(CURL *curl) | |
| size_t rlen; | |
| const struct curl_ws_frame *meta; | |
| char buffer[256]; | |
| - | CURLcode res = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); |
| - | if(res) |
| - | return res; |
| + | CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); |
| + | if(result) |
| + | return result; |
| curl_mfprintf(stderr, "recv_any: got %zu bytes rflags %x\n", rlen, | |
| meta->flags); | |
| @@ -62,7 +62,7 @@ static CURLcode test_lib2304(const char *URL) | |
| { | |
| #ifndef CURL_DISABLE_WEBSOCKETS | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -74,16 +74,16 @@ static CURLcode test_lib2304(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_USERAGENT, "websocket/2304"); | |
| curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 2L); /* websocket style */ | |
| - | res = curl_easy_perform(curl); |
| - | curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", res); |
| - | if(res == CURLE_OK) |
| + | result = curl_easy_perform(curl); |
| + | curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", result); |
| + | if(result == CURLE_OK) |
| t2304_websocket(curl); | |
| /* always cleanup */ | |
| curl_easy_cleanup(curl); | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| #else | |
| NO_SUPPORT_BUILT_IN | |
| #endif | |
| @@ -27,23 +27,23 @@ static CURLcode test_lib2306(const char *URL) | |
| { | |
| /* first a fine GET response, then a bad one */ | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| easy_init(curl); | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* reuse handle, do a second transfer */ | |
| easy_setopt(curl, CURLOPT_URL, libtest_arg2); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -35,14 +35,14 @@ static size_t cb_curl(char *buffer, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib2308(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| curl = curl_easy_init(); | |
| curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cb_curl); | |
| curl_easy_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| - | curl_mprintf("Returned %d, should be %d.\n", res, CURLE_WRITE_ERROR); |
| + | result = curl_easy_perform(curl); |
| + | curl_mprintf("Returned %d, should be %d.\n", result, CURLE_WRITE_ERROR); |
| fflush(stdout); | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| @@ -36,7 +36,7 @@ static CURLcode test_lib2309(const char *URL) | |
| { | |
| CURL *curl; | |
| CURL *curldupe; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| curl = curl_easy_init(); | |
| @@ -50,8 +50,8 @@ static CURLcode test_lib2309(const char *URL) | |
| curldupe = curl_easy_duphandle(curl); | |
| if(curldupe) { | |
| - | res = curl_easy_perform(curldupe); |
| - | curl_mprintf("Returned %d, should be %d.\n", res, CURLE_WRITE_ERROR); |
| + | result = curl_easy_perform(curldupe); |
| + | curl_mprintf("Returned %d, should be %d.\n", result, CURLE_WRITE_ERROR); |
| fflush(stdout); | |
| curl_easy_cleanup(curldupe); | |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib2402(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl[NUM_HANDLES] = { 0 }; | |
| int running; | |
| CURLM *multi = NULL; | |
| @@ -128,5 +128,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib2404(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl[NUM_HANDLES] = { 0 }; | |
| int running; | |
| CURLM *multi = NULL; | |
| @@ -130,5 +130,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -5,7 +5,7 @@ | |
| * | (__| |_| | _ <| |___ | |
| * \___|\___/|_| \_\_____| | |
| * | |
| - | * Copyright (C) Dmitry Karpov <[email protected]> |
| + | * Copyright (C) Dmitry Karpov <dkarpov1970, [email protected]> |
| * | |
| * This software is licensed as described in the file COPYING, which | |
| * you should have received as part of this distribution. The terms | |
| @@ -42,21 +42,21 @@ | |
| /* ---------------------------------------------------------------- */ | |
| #define test_check(expected_fds) \ | |
| - | if(res != CURLE_OK) { \ |
| - | curl_mfprintf(stderr, "test failed with code: %d\n", res); \ |
| + | if(result != CURLE_OK) { \ |
| + | curl_mfprintf(stderr, "test failed with code: %d\n", result); \ |
| goto test_cleanup; \ | |
| } \ | |
| else if(fd_count != expected_fds) { \ | |
| curl_mfprintf(stderr, "Max number of waitfds: %u not as expected: %u\n", \ | |
| fd_count, expected_fds); \ | |
| - | res = TEST_ERR_FAILURE; \ |
| + | result = TEST_ERR_FAILURE; \ |
| goto test_cleanup; \ | |
| } | |
| - | #define test_run_check(option, expected_fds) \ |
| - | do { \ |
| - | res = test_run(URL, option, &fd_count); \ |
| - | test_check(expected_fds); \ |
| + | #define test_run_check(option, expected_fds) \ |
| + | do { \ |
| + | result = test_run(URL, option, &fd_count); \ |
| + | test_check(expected_fds); \ |
| } while(0) | |
| /* ---------------------------------------------------------------- */ | |
| @@ -76,7 +76,7 @@ static size_t emptyWriteFunc(char *ptr, size_t size, size_t nmemb, void *data) | |
| static CURLcode set_easy(const char *URL, CURL *curl, long option) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| /* First set the URL that is about to receive our POST. */ | |
| easy_setopt(curl, CURLOPT_URL, URL); | |
| @@ -113,13 +113,13 @@ static CURLcode set_easy(const char *URL, CURL *curl, long option) | |
| easy_setopt(curl, CURLOPT_WRITEFUNCTION, emptyWriteFunc); | |
| test_cleanup: | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode test_run(const char *URL, long option, | |
| unsigned int *max_fd_count) | |
| { | |
| - | CURLMcode mc = CURLM_OK; |
| + | CURLMcode mresult = CURLM_OK; |
| CURLM *multi = NULL; | |
| CURLM *multi1 = NULL; | |
| @@ -132,8 +132,7 @@ static CURLcode test_run(const char *URL, long option, | |
| CURLMsg *msg; /* for picking up messages with the transfer status */ | |
| int msgs_left; /* how many messages are left */ | |
| - | CURLcode result; |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct curl_waitfd ufds[10]; | |
| struct curl_waitfd ufds1[10]; | |
| @@ -157,48 +156,49 @@ static CURLcode test_run(const char *URL, long option, | |
| multi_add_handle(multi, curl1); | |
| multi_add_handle(multi, curl2); | |
| - | while(!mc) { |
| + | while(!mresult) { |
| /* get the count of file descriptors from the transfers */ | |
| unsigned int fd_count = 0; | |
| unsigned int fd_count_chk = 0; | |
| - | mc = curl_multi_perform(multi, &still_running); |
| - | if(!still_running || mc != CURLM_OK) |
| + | mresult = curl_multi_perform(multi, &still_running); |
| + | if(!still_running || mresult != CURLM_OK) |
| break; | |
| /* verify improper inputs are treated correctly. */ | |
| - | mc = curl_multi_waitfds(multi, NULL, 0, NULL); |
| + | mresult = curl_multi_waitfds(multi, NULL, 0, NULL); |
| - | if(mc != CURLM_BAD_FUNCTION_ARGUMENT) { |
| + | if(mresult != CURLM_BAD_FUNCTION_ARGUMENT) { |
| curl_mfprintf(stderr, "curl_multi_waitfds() return code %d instead of " | |
| - | "CURLM_BAD_FUNCTION_ARGUMENT.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | "CURLM_BAD_FUNCTION_ARGUMENT.\n", mresult); |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| - | mc = curl_multi_waitfds(multi, NULL, 1, NULL); |
| + | mresult = curl_multi_waitfds(multi, NULL, 1, NULL); |
| - | if(mc != CURLM_BAD_FUNCTION_ARGUMENT) { |
| + | if(mresult != CURLM_BAD_FUNCTION_ARGUMENT) { |
| curl_mfprintf(stderr, "curl_multi_waitfds() return code %d instead of " | |
| - | "CURLM_BAD_FUNCTION_ARGUMENT.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | "CURLM_BAD_FUNCTION_ARGUMENT.\n", mresult); |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| - | mc = curl_multi_waitfds(multi, NULL, 1, &fd_count); |
| + | mresult = curl_multi_waitfds(multi, NULL, 1, &fd_count); |
| - | if(mc != CURLM_BAD_FUNCTION_ARGUMENT) { |
| + | if(mresult != CURLM_BAD_FUNCTION_ARGUMENT) { |
| curl_mfprintf(stderr, "curl_multi_waitfds() return code %d instead of " | |
| - | "CURLM_BAD_FUNCTION_ARGUMENT.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | "CURLM_BAD_FUNCTION_ARGUMENT.\n", mresult); |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| - | mc = curl_multi_waitfds(multi, ufds, 10, &fd_count); |
| + | mresult = curl_multi_waitfds(multi, ufds, 10, &fd_count); |
| - | if(mc != CURLM_OK) { |
| - | curl_mfprintf(stderr, "curl_multi_waitfds() failed, code %d.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | if(mresult != CURLM_OK) { |
| + | curl_mfprintf(stderr, "curl_multi_waitfds() failed, code %d.\n", |
| + | mresult); |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| @@ -207,11 +207,12 @@ static CURLcode test_run(const char *URL, long option, | |
| /* verify that sending nothing but the fd_count results in at least the | |
| * same number of fds */ | |
| - | mc = curl_multi_waitfds(multi, NULL, 0, &fd_count_chk); |
| + | mresult = curl_multi_waitfds(multi, NULL, 0, &fd_count_chk); |
| - | if(mc != CURLM_OK) { |
| - | curl_mfprintf(stderr, "curl_multi_waitfds() failed, code %d.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | if(mresult != CURLM_OK) { |
| + | curl_mfprintf(stderr, "curl_multi_waitfds() failed, code %d.\n", |
| + | mresult); |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| @@ -219,17 +220,17 @@ static CURLcode test_run(const char *URL, long option, | |
| curl_mfprintf(stderr, | |
| "curl_multi_waitfds() should return at least the number " | |
| "of fds needed (%u vs. %u)\n", fd_count_chk, fd_count); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| /* checking case when we do not have enough space for waitfds */ | |
| - | mc = curl_multi_waitfds(multi, ufds1, fd_count - 1, &fd_count_chk); |
| + | mresult = curl_multi_waitfds(multi, ufds1, fd_count - 1, &fd_count_chk); |
| - | if(mc != CURLM_OUT_OF_MEMORY) { |
| + | if(mresult != CURLM_OUT_OF_MEMORY) { |
| curl_mfprintf(stderr, "curl_multi_waitfds() return code %d instead of " | |
| - | "CURLM_OUT_OF_MEMORY.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | "CURLM_OUT_OF_MEMORY.\n", mresult); |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| @@ -238,26 +239,26 @@ static CURLcode test_run(const char *URL, long option, | |
| "curl_multi_waitfds() should return the amount of fds " | |
| "needed if enough is not passed in (%u vs. %u).\n", | |
| fd_count_chk, fd_count); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| /* sending ufds with zero size, is valid */ | |
| - | mc = curl_multi_waitfds(multi, ufds, 0, NULL); |
| + | mresult = curl_multi_waitfds(multi, ufds, 0, NULL); |
| - | if(mc != CURLM_OUT_OF_MEMORY) { |
| + | if(mresult != CURLM_OUT_OF_MEMORY) { |
| curl_mfprintf(stderr, "curl_multi_waitfds() return code %d instead of " | |
| - | "CURLM_OUT_OF_MEMORY.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | "CURLM_OUT_OF_MEMORY.\n", mresult); |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| - | mc = curl_multi_waitfds(multi, ufds, 0, &fd_count_chk); |
| + | mresult = curl_multi_waitfds(multi, ufds, 0, &fd_count_chk); |
| - | if(mc != CURLM_OUT_OF_MEMORY) { |
| + | if(mresult != CURLM_OUT_OF_MEMORY) { |
| curl_mfprintf(stderr, "curl_multi_waitfds() return code %d instead of " | |
| - | "CURLM_OUT_OF_MEMORY.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | "CURLM_OUT_OF_MEMORY.\n", mresult); |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| @@ -266,7 +267,7 @@ static CURLcode test_run(const char *URL, long option, | |
| "curl_multi_waitfds() should return the amount of fds " | |
| "needed if enough is not passed in (%u vs. %u).\n", | |
| fd_count_chk, fd_count); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| @@ -274,11 +275,11 @@ static CURLcode test_run(const char *URL, long option, | |
| max_count = fd_count; | |
| /* Do polling on descriptors in ufds in Multi 1 */ | |
| - | mc = curl_multi_poll(multi1, ufds, fd_count, 500, &numfds); |
| + | mresult = curl_multi_poll(multi1, ufds, fd_count, 500, &numfds); |
| - | if(mc != CURLM_OK) { |
| - | curl_mfprintf(stderr, "curl_multi_poll() failed, code %d.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | if(mresult != CURLM_OK) { |
| + | curl_mfprintf(stderr, "curl_multi_poll() failed, code %d.\n", mresult); |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| } | |
| @@ -289,9 +290,6 @@ static CURLcode test_run(const char *URL, long option, | |
| break; | |
| if(msg->msg == CURLMSG_DONE) { | |
| result = msg->data.result; | |
| - | |
| - | if(!res) |
| - | res = result; |
| } | |
| } | |
| @@ -308,34 +306,34 @@ test_cleanup: | |
| if(max_fd_count) | |
| *max_fd_count = max_count; | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode empty_multi_test(void) | |
| { | |
| - | CURLMcode mc = CURLM_OK; |
| + | CURLMcode mresult = CURLM_OK; |
| CURLM *multi = NULL; | |
| CURL *curl = NULL; | |
| struct curl_waitfd ufds[10]; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| unsigned int fd_count = 0; | |
| multi_init(multi); | |
| /* calling curl_multi_waitfds() on an empty multi handle. */ | |
| - | mc = curl_multi_waitfds(multi, ufds, 10, &fd_count); |
| + | mresult = curl_multi_waitfds(multi, ufds, 10, &fd_count); |
| - | if(mc != CURLM_OK) { |
| - | curl_mfprintf(stderr, "curl_multi_waitfds() failed, code %d.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | if(mresult != CURLM_OK) { |
| + | curl_mfprintf(stderr, "curl_multi_waitfds() failed, code %d.\n", mresult); |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| else if(fd_count > 0) { | |
| curl_mfprintf(stderr, "curl_multi_waitfds() returned non-zero count of " | |
| "waitfds: %d.\n", fd_count); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| @@ -347,17 +345,17 @@ static CURLcode empty_multi_test(void) | |
| multi_add_handle(multi, curl); | |
| - | mc = curl_multi_waitfds(multi, ufds, 10, &fd_count); |
| + | mresult = curl_multi_waitfds(multi, ufds, 10, &fd_count); |
| - | if(mc != CURLM_OK) { |
| - | curl_mfprintf(stderr, "curl_multi_waitfds() failed, code %d.\n", mc); |
| - | res = TEST_ERR_FAILURE; |
| + | if(mresult != CURLM_OK) { |
| + | curl_mfprintf(stderr, "curl_multi_waitfds() failed, code %d.\n", mresult); |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| else if(fd_count > 0) { | |
| curl_mfprintf(stderr, "curl_multi_waitfds() returned non-zero count of " | |
| "waitfds: %d.\n", fd_count); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| @@ -366,19 +364,19 @@ static CURLcode empty_multi_test(void) | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_multi_cleanup(multi); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode test_lib2405(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| unsigned int fd_count = 0; | |
| global_init(CURL_GLOBAL_ALL); | |
| /* Testing curl_multi_waitfds on empty and not started handles */ | |
| - | res = empty_multi_test(); |
| - | if(res != CURLE_OK) |
| + | result = empty_multi_test(); |
| + | if(result != CURLE_OK) |
| goto test_cleanup; | |
| if(testnum == 2405) { | |
| @@ -397,5 +395,5 @@ static CURLcode test_lib2405(const char *URL) | |
| test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -27,7 +27,7 @@ | |
| static CURLcode test_lib2502(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl[NUM_HANDLES] = { 0 }; | |
| int running; | |
| CURLM *multi = NULL; | |
| @@ -133,5 +133,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -45,21 +45,21 @@ static const char *descr_flags(int flags) | |
| static CURLcode send_header(CURL *curl, int flags, size_t size) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| size_t nsent; | |
| retry: | |
| - | res = curl_ws_send(curl, NULL, 0, &nsent, (curl_off_t)size, |
| + | result = curl_ws_send(curl, NULL, 0, &nsent, (curl_off_t)size, |
| flags | CURLWS_OFFSET); | |
| - | if(res == CURLE_AGAIN) { |
| + | if(result == CURLE_AGAIN) { |
| assert(nsent == 0); | |
| goto retry; | |
| } | |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, "%s:%d curl_ws_send() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| assert(nsent == 0); | |
| - | return res; |
| + | return result; |
| } | |
| assert(nsent == 0); | |
| @@ -70,7 +70,7 @@ retry: | |
| static CURLcode recv_header(CURL *curl, int *flags, curl_off_t *offset, | |
| curl_off_t *bytesleft) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| size_t nread; | |
| const struct curl_ws_frame *meta; | |
| @@ -79,16 +79,16 @@ static CURLcode recv_header(CURL *curl, int *flags, curl_off_t *offset, | |
| *bytesleft = 0; | |
| retry: | |
| - | res = curl_ws_recv(curl, NULL, 0, &nread, &meta); |
| - | if(res == CURLE_AGAIN) { |
| + | result = curl_ws_recv(curl, NULL, 0, &nread, &meta); |
| + | if(result == CURLE_AGAIN) { |
| assert(nread == 0); | |
| goto retry; | |
| } | |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, "%s:%d curl_ws_recv() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| assert(nread == 0); | |
| - | return res; |
| + | return result; |
| } | |
| assert(nread == 0); | |
| @@ -106,9 +106,9 @@ retry: | |
| if(meta->bytesleft > 0) | |
| curl_mfprintf(stdout, " "); | |
| - | res = send_header(curl, meta->flags, (size_t)meta->bytesleft); |
| - | if(res) |
| - | return res; |
| + | result = send_header(curl, meta->flags, (size_t)meta->bytesleft); |
| + | if(result) |
| + | return result; |
| return CURLE_OK; | |
| } | |
| @@ -116,20 +116,21 @@ retry: | |
| static CURLcode send_chunk(CURL *curl, int flags, const char *buffer, | |
| size_t size, size_t *offset) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| size_t nsent; | |
| retry: | |
| - | res = curl_ws_send(curl, buffer + *offset, size - *offset, &nsent, 0, flags); |
| - | if(res == CURLE_AGAIN) { |
| + | result = curl_ws_send(curl, buffer + *offset, size - *offset, &nsent, |
| + | 0, flags); |
| + | if(result == CURLE_AGAIN) { |
| assert(nsent == 0); | |
| goto retry; | |
| } | |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, "%s:%d curl_ws_send() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| assert(nsent == 0); | |
| - | return res; |
| + | return result; |
| } | |
| assert(nsent <= size - *offset); | |
| @@ -142,23 +143,23 @@ retry: | |
| static CURLcode recv_chunk(CURL *curl, int flags, curl_off_t *offset, | |
| curl_off_t *bytesleft) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| char buffer[256]; | |
| size_t nread; | |
| const struct curl_ws_frame *meta; | |
| size_t sendoffset = 0; | |
| retry: | |
| - | res = curl_ws_recv(curl, buffer, sizeof(buffer), &nread, &meta); |
| - | if(res == CURLE_AGAIN) { |
| + | result = curl_ws_recv(curl, buffer, sizeof(buffer), &nread, &meta); |
| + | if(result == CURLE_AGAIN) { |
| assert(nread == 0); | |
| goto retry; | |
| } | |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, "%s:%d curl_ws_recv() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| assert(nread == 0); | |
| - | return res; |
| + | return result; |
| } | |
| assert(nread <= sizeof(buffer)); | |
| @@ -173,9 +174,9 @@ retry: | |
| fwrite(buffer, 1, nread, stdout); | |
| while(sendoffset < nread) { | |
| - | res = send_chunk(curl, flags, buffer, nread, &sendoffset); |
| - | if(res) |
| - | return res; |
| + | result = send_chunk(curl, flags, buffer, nread, &sendoffset); |
| + | if(result) |
| + | return result; |
| } | |
| return CURLE_OK; | |
| @@ -183,19 +184,19 @@ retry: | |
| static CURLcode recv_frame(CURL *curl, bool *stop) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int flags = 0; | |
| curl_off_t offset = 0; | |
| curl_off_t bytesleft = 0; | |
| - | res = recv_header(curl, &flags, &offset, &bytesleft); |
| - | if(res) |
| - | return res; |
| + | result = recv_header(curl, &flags, &offset, &bytesleft); |
| + | if(result) |
| + | return result; |
| while(bytesleft > 0) { | |
| - | res = recv_chunk(curl, flags, &offset, &bytesleft); |
| - | if(res) |
| - | return res; |
| + | result = recv_chunk(curl, flags, &offset, &bytesleft); |
| + | if(result) |
| + | return result; |
| } | |
| if(flags & CURLWS_CLOSE) | |
| @@ -203,14 +204,14 @@ static CURLcode recv_frame(CURL *curl, bool *stop) | |
| curl_mfprintf(stdout, "\n"); | |
| - | return res; |
| + | return result; |
| } | |
| #endif | |
| static CURLcode test_lib2700(const char *URL) | |
| { | |
| #ifndef CURL_DISABLE_WEBSOCKETS | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| bool stop = false; | |
| CURL *curl; | |
| @@ -229,24 +230,24 @@ static CURLcode test_lib2700(const char *URL) | |
| if(testnum != 2708) | |
| easy_setopt(curl, CURLOPT_WS_OPTIONS, CURLWS_NOAUTOPONG); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_perform() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| while(!stop) { | |
| - | res = recv_frame(curl, &stop); |
| - | if(res) |
| + | result = recv_frame(curl, &stop); |
| + | if(result) |
| goto test_cleanup; | |
| } | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| #else | |
| NO_SUPPORT_BUILT_IN | |
| #endif | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib3010(const char *URL) | |
| { | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| CURL *curl = NULL; | |
| curl_off_t retry_after; | |
| char *follow_url = NULL; | |
| @@ -35,22 +35,22 @@ static CURLcode test_lib3010(const char *URL) | |
| if(curl) { | |
| curl_easy_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_perform() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &follow_url); | |
| curl_easy_getinfo(curl, CURLINFO_RETRY_AFTER, &retry_after); | |
| curl_mprintf("Retry-After %" CURL_FORMAT_CURL_OFF_T "\n", retry_after); | |
| curl_easy_setopt(curl, CURLOPT_URL, follow_url); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_perform() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| @@ -63,5 +63,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib3025(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| struct curl_slist *icy = NULL; | |
| @@ -47,7 +47,7 @@ static CURLcode test_lib3025(const char *URL) | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -55,5 +55,5 @@ test_cleanup: | |
| curl_slist_free_all(icy); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode t3033_req_test(CURLM *multi, CURL *curl, | |
| const char *URL, int index) | |
| { | |
| CURLMsg *msg = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int still_running = 0; | |
| if(index == 1) { | |
| @@ -49,13 +49,13 @@ static CURLcode t3033_req_test(CURLM *multi, CURL *curl, | |
| curl_multi_add_handle(multi, curl); | |
| do { | |
| - | CURLMcode mres; |
| + | CURLMcode mresult; |
| int num; | |
| curl_multi_perform(multi, &still_running); | |
| - | mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| - | if(mres != CURLM_OK) { |
| - | curl_mfprintf(stderr, "curl_multi_wait() returned %d\n", mres); |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | mresult = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| + | if(mresult != CURLM_OK) { |
| + | curl_mfprintf(stderr, "curl_multi_wait() returned %d\n", mresult); |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| } while(still_running); | |
| @@ -67,21 +67,21 @@ static CURLcode t3033_req_test(CURLM *multi, CURL *curl, | |
| if(msg->msg != CURLMSG_DONE) | |
| continue; | |
| - | res = msg->data.result; |
| - | if(res != CURLE_OK) { |
| - | curl_mfprintf(stderr, "curl_multi_info_read() returned %d\n", res); |
| + | result = msg->data.result; |
| + | if(result != CURLE_OK) { |
| + | curl_mfprintf(stderr, "curl_multi_info_read() returned %d\n", result); |
| goto test_cleanup; | |
| } | |
| curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &num_connects); | |
| if(index == 1 && num_connects == 0) { | |
| curl_mprintf("[1] should not reuse connection in pool\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| else if(index == 2 && num_connects) { | |
| curl_mprintf("[2] should have reused connection from [1]\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| } | |
| @@ -91,14 +91,14 @@ test_cleanup: | |
| curl_multi_remove_handle(multi, curl); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode test_lib3033(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| multi_init(multi); | |
| @@ -107,14 +107,14 @@ static CURLcode test_lib3033(const char *URL) | |
| debug_config.nohex = TRUE; | |
| debug_config.tracetime = TRUE; | |
| - | res = t3033_req_test(multi, curl, URL, 0); |
| - | if(res != CURLE_OK) |
| + | result = t3033_req_test(multi, curl, URL, 0); |
| + | if(result != CURLE_OK) |
| goto test_cleanup; | |
| - | res = t3033_req_test(multi, curl, URL, 1); |
| - | if(res != CURLE_OK) |
| + | result = t3033_req_test(multi, curl, URL, 1); |
| + | if(result != CURLE_OK) |
| goto test_cleanup; | |
| - | res = t3033_req_test(multi, curl, URL, 2); |
| - | if(res != CURLE_OK) |
| + | result = t3033_req_test(multi, curl, URL, 2); |
| + | if(result != CURLE_OK) |
| goto test_cleanup; | |
| test_cleanup: | |
| @@ -123,5 +123,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; /* return the final return code */ |
| + | return result; /* return the final return code */ |
| } | |
| @@ -37,7 +37,7 @@ static size_t t3034_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib3034(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| easy_init(curl); | |
| @@ -53,11 +53,11 @@ static CURLcode test_lib3034(const char *URL) | |
| test_setopt(curl, CURLOPT_INFILESIZE, 5L); | |
| test_setopt(curl, CURLOPT_READFUNCTION, t3034_read_cb); | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_SEND_FAIL_REWIND) { |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_SEND_FAIL_REWIND) { |
| curl_mfprintf(stderr, | |
| "%s:%d curl_easy_perform() failed with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| @@ -68,10 +68,10 @@ static CURLcode test_lib3034(const char *URL) | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib3100(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -52,10 +52,10 @@ static CURLcode test_lib3100(const char *URL) | |
| test_setopt(curl, CURLOPT_PASSWORD, "password"); | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_DESCRIBE); | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_OK) { |
| - | curl_mfprintf(stderr, "Failed to send DESCRIBE: %d\n", res); |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_OK) { |
| + | curl_mfprintf(stderr, "Failed to send DESCRIBE: %d\n", result); |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -63,5 +63,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib3101(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -49,9 +49,9 @@ static CURLcode test_lib3101(const char *URL) | |
| test_setopt(curl, CURLOPT_PASSWORD, "password"); | |
| test_setopt(curl, CURLOPT_REDIR_PROTOCOLS_STR, "https"); | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_OK) { |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_OK) { |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -59,5 +59,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -90,7 +90,7 @@ static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream) | |
| static CURLcode test_lib3102(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -117,16 +117,16 @@ static CURLcode test_lib3102(const char *URL) | |
| test_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); | |
| test_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| - | if(!res || res == CURLE_GOT_NOTHING) { |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| + | if(!result || result == CURLE_GOT_NOTHING) { |
| struct curl_certinfo *cert_info = NULL; | |
| /* Get the certificate information */ | |
| - | res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &cert_info); |
| - | if(!res) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &cert_info); |
| + | if(!result) { |
| /* Check to see if the certificate chain is ordered correctly */ | |
| if(!is_chain_in_order(cert_info)) | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| } | |
| } | |
| @@ -136,5 +136,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib3103(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLSH *share; | |
| CURL *curl; | |
| @@ -47,10 +47,10 @@ static CURLcode test_lib3103(const char *URL) | |
| /* Set a cookie without Max-age or Expires */ | |
| test_setopt(curl, CURLOPT_COOKIELIST, "Set-Cookie: c1=v1; domain=localhost"); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_easy_perform() failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| } | |
| test_cleanup: | |
| @@ -60,5 +60,5 @@ test_cleanup: | |
| curl_share_cleanup(share); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib3104(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLSH *share; | |
| CURL *curl; | |
| @@ -47,10 +47,10 @@ static CURLcode test_lib3104(const char *URL) | |
| test_setopt(curl, CURLOPT_COOKIELIST, | |
| "example.com\tFALSE\t/\tFALSE\t0\tname\tvalue"); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_easy_perform() failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| } | |
| test_cleanup: | |
| @@ -60,5 +60,5 @@ test_cleanup: | |
| curl_share_cleanup(share); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -28,8 +28,8 @@ static CURLcode test_lib3105(const char *URL) | |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| CURLcode i = CURLE_OK; | |
| - | CURLcode res = CURLE_OK; |
| - | CURLMcode mc; |
| + | CURLcode result = CURLE_OK; |
| + | CURLMcode mresult; |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -41,11 +41,12 @@ static CURLcode test_lib3105(const char *URL) | |
| multi_add_handle(multi, curl); | |
| - | mc = curl_multi_remove_handle(multi, curl); |
| - | mc += curl_multi_remove_handle(multi, curl); |
| + | mresult = curl_multi_remove_handle(multi, curl); |
| + | if(!mresult) |
| + | mresult = curl_multi_remove_handle(multi, curl); |
| - | if(mc) { |
| - | curl_mfprintf(stderr, "%d was unexpected\n", mc); |
| + | if(mresult) { |
| + | curl_mfprintf(stderr, "%d was unexpected\n", mresult); |
| i = CURLE_FAILED_INIT; | |
| } | |
| @@ -54,8 +55,8 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | if(res) |
| - | i = res; |
| + | if(result) |
| + | i = result; |
| return i; /* return the final return code */ | |
| } | |
| @@ -35,7 +35,7 @@ | |
| struct Ctx { | |
| const char *URL; | |
| CURLSH *share; | |
| - | CURLcode res; |
| + | CURLcode result; |
| size_t thread_id; | |
| struct curl_slist *contents; | |
| }; | |
| @@ -73,7 +73,7 @@ static unsigned int test_thread(void *ptr) | |
| #endif | |
| { | |
| struct Ctx *ctx = (struct Ctx *)ptr; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int i; | |
| @@ -92,22 +92,22 @@ static unsigned int test_thread(void *ptr) | |
| curl_easy_setopt(curl, CURLOPT_WRITEDATA, ptr); | |
| curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| /* always cleanup */ | |
| curl_easy_cleanup(curl); | |
| /* Check for errors */ | |
| - | if(res != CURLE_OK) { |
| + | if(result != CURLE_OK) { |
| curl_mfprintf(stderr, "curl_easy_perform() failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| } | |
| } | |
| test_cleanup: | |
| - | ctx->res = res; |
| + | ctx->result = result; |
| return 0; | |
| } | |
| @@ -173,7 +173,7 @@ static void execute(CURLSH *share, struct Ctx *ctx) | |
| static CURLcode test_lib3207(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| size_t i; | |
| CURLSH *share; | |
| struct Ctx ctx[THREAD_SIZE]; | |
| @@ -190,15 +190,15 @@ static CURLcode test_lib3207(const char *URL) | |
| ctx[i].share = share; | |
| ctx[i].URL = URL; | |
| ctx[i].thread_id = i; | |
| - | ctx[i].res = CURLE_OK; |
| + | ctx[i].result = CURLE_OK; |
| ctx[i].contents = NULL; | |
| } | |
| execute(share, ctx); | |
| for(i = 0; i < CURL_ARRAYSIZE(ctx); i++) { | |
| - | if(ctx[i].res) { |
| - | res = ctx[i].res; |
| + | if(ctx[i].result) { |
| + | result = ctx[i].result; |
| } | |
| else { | |
| struct curl_slist *item = ctx[i].contents; | |
| @@ -214,5 +214,5 @@ test_cleanup: | |
| if(share) | |
| curl_share_cleanup(share); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode test_lib3208(const char *URL) | |
| CURLM *multi = NULL; | |
| int still_running; | |
| CURLcode i = TEST_ERR_FAILURE; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLMsg *msg; | |
| start_test_timing(); | |
| @@ -58,12 +58,12 @@ static CURLcode test_lib3208(const char *URL) | |
| abort_on_test_timeout(); | |
| while(still_running) { | |
| - | CURLMcode mres; |
| + | CURLMcode mresult; |
| int num; | |
| - | mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| - | if(mres != CURLM_OK) { |
| - | curl_mprintf("curl_multi_wait() returned %d\n", mres); |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | mresult = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| + | if(mresult != CURLM_OK) { |
| + | curl_mprintf("curl_multi_wait() returned %d\n", mresult); |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -93,8 +93,8 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | if(res) |
| - | i = res; |
| + | if(result) |
| + | i = result; |
| return i; /* return the final return code */ | |
| } | |
| @@ -53,7 +53,7 @@ static void setupcallbacks(CURL *curl) | |
| static CURLcode test_lib500(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| char *ipstr = NULL; | |
| @@ -84,10 +84,10 @@ static CURLcode test_lib500(const char *URL) | |
| if(testnum == 585 || testnum == 586 || testnum == 595 || testnum == 596) | |
| setupcallbacks(curl); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| - | if(!res) { |
| - | res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ipstr); |
| + | if(!result) { |
| + | result = curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ipstr); |
| if(libtest_arg2) { | |
| FILE *moo = curlx_fopen(libtest_arg2, "wb"); | |
| if(moo) { | |
| @@ -175,5 +175,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib501(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| (void)URL; | |
| @@ -47,12 +47,12 @@ static CURLcode test_lib501(const char *URL) | |
| /* just verify that setting this to -1 is fine */ | |
| test_setopt(curl, CURLOPT_MAXREDIRS, -1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -31,7 +31,7 @@ static CURLcode test_lib502(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int running; | |
| start_test_timing(); | |
| @@ -83,5 +83,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -35,7 +35,7 @@ static CURLcode test_lib503(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int running; | |
| start_test_timing(); | |
| @@ -94,5 +94,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -33,7 +33,7 @@ | |
| static CURLcode test_lib504(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLM *multi = NULL; | |
| fd_set rd, wr, exc; | |
| int running; | |
| @@ -67,12 +67,12 @@ static CURLcode test_lib504(const char *URL) | |
| multi_perform(multi, &running); | |
| while(running) { | |
| - | CURLMcode mres; |
| + | CURLMcode mresult; |
| int num; | |
| - | mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| - | if(mres != CURLM_OK) { |
| - | curl_mprintf("curl_multi_wait() returned %d\n", mres); |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | mresult = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num); |
| + | if(mresult != CURLM_OK) { |
| + | curl_mprintf("curl_multi_wait() returned %d\n", mresult); |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -89,9 +89,9 @@ static CURLcode test_lib504(const char *URL) | |
| CURLMsg *msg = curl_multi_info_read(multi, &numleft); | |
| curl_mfprintf(stderr, "Expected: not running\n"); | |
| if(msg && !numleft) | |
| - | res = TEST_ERR_SUCCESS; /* this is where we should be */ |
| + | result = TEST_ERR_SUCCESS; /* this is where we should be */ |
| else | |
| - | res = TEST_ERR_FAILURE; /* not correct */ |
| + | result = TEST_ERR_FAILURE; /* not correct */ |
| break; /* done */ | |
| } | |
| curl_mfprintf(stderr, "running == %d\n", running); | |
| @@ -120,5 +120,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -33,7 +33,7 @@ | |
| static CURLcode test_lib505(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| char errbuf[STRERROR_LEN]; | |
| FILE *hd_src; | |
| int hd; | |
| @@ -130,7 +130,7 @@ static CURLcode test_lib505(const char *URL) | |
| test_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)file_info.st_size); | |
| /* Now run off and do what you have been told! */ | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -143,5 +143,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -163,7 +163,7 @@ static void *t506_test_fire(void *ptr) | |
| /* test function */ | |
| static CURLcode test_lib506(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURLSHcode scode = CURLSHE_OK; | |
| CURLcode code = CURLE_OK; | |
| char *url = NULL; | |
| @@ -315,18 +315,18 @@ static CURLcode test_lib506(const char *URL) | |
| curl_mprintf("CURLOPT_COOKIELIST RELOAD\n"); | |
| test_setopt(curl, CURLOPT_COOKIELIST, "RELOAD"); | |
| - | res = CURLE_OK; |
| + | result = CURLE_OK; |
| code = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies); | |
| if(code != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_easy_getinfo() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| curl_mprintf("loaded cookies:\n"); | |
| if(!cookies) { | |
| curl_mfprintf(stderr, " reloading cookies from '%s' failed\n", jar); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| curl_mprintf("-----------------\n"); | |
| @@ -366,5 +366,5 @@ test_cleanup: | |
| curl_mprintf("GLOBAL_CLEANUP\n"); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode test_lib507(const char *URL) | |
| CURLM *multi = NULL; | |
| int still_running; | |
| CURLcode i = TEST_ERR_MAJOR_BAD; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLMsg *msg; | |
| start_test_timing(); | |
| @@ -89,8 +89,8 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | if(res) |
| - | i = res; |
| + | if(result) |
| + | i = result; |
| return i; /* return the final return code */ | |
| } | |
| @@ -51,7 +51,7 @@ static CURLcode test_lib508(const char *URL) | |
| "this is what we post to the silly web server\n"; | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct t508_WriteThis pooh; | |
| @@ -91,8 +91,8 @@ static CURLcode test_lib508(const char *URL) | |
| /* include headers in the output */ | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -100,5 +100,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -80,19 +80,19 @@ static CURLcode test_lib509(const char *URL) | |
| 0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, | |
| 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7 | |
| }; | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| int asize; | |
| char *str = NULL; | |
| (void)URL; | |
| - | res = curl_global_init_mem(CURL_GLOBAL_ALL, |
| - | custom_malloc, |
| - | custom_free, |
| - | custom_realloc, |
| - | custom_strdup, |
| - | custom_calloc); |
| - | if(res != CURLE_OK) { |
| + | result = curl_global_init_mem(CURL_GLOBAL_ALL, |
| + | custom_malloc, |
| + | custom_free, |
| + | custom_realloc, |
| + | custom_strdup, |
| + | custom_calloc); |
| + | if(result != CURLE_OK) { |
| curl_mfprintf(stderr, "curl_global_init_mem() failed\n"); | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| @@ -121,5 +121,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -61,7 +61,7 @@ static size_t t510_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib510(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct curl_slist *slist = NULL; | |
| struct t510_WriteThis pooh; | |
| pooh.counter = 0; | |
| @@ -112,8 +112,8 @@ static CURLcode test_lib510(const char *URL) | |
| test_setopt(curl, CURLOPT_USERPWD, "foo:bar"); | |
| } | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -125,5 +125,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib511(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -45,12 +45,12 @@ static CURLcode test_lib511(const char *URL) | |
| test_setopt(curl, CURLOPT_NOBODY, 1L); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -35,7 +35,7 @@ static size_t t513_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib513(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -70,8 +70,8 @@ static CURLcode test_lib513(const char *URL) | |
| /* include headers in the output */ | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -79,5 +79,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib514(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -66,8 +66,8 @@ static CURLcode test_lib514(const char *URL) | |
| /* Now, we should be making a fine HEAD request */ | |
| - | /* Perform the request 2, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request 2, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -75,5 +75,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib515(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -48,7 +48,7 @@ static CURLcode test_lib515(const char *URL) | |
| test_setopt(curl, CURLOPT_HEADER, 1L); /* include header */ | |
| /* Now, we should be making a zero byte POST request */ | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -56,5 +56,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib516(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -47,7 +47,7 @@ static CURLcode test_lib516(const char *URL) | |
| test_setopt(curl, CURLOPT_HEADER, 1L); /* include header */ | |
| /* Now, we should be making a zero byte POST request */ | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -55,5 +55,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -424,7 +424,7 @@ static int t518_test_rlimit(int keep_open) | |
| static CURLcode test_lib518(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(!strcmp(URL, "check")) { | |
| @@ -461,7 +461,7 @@ static CURLcode test_lib518(const char *URL) | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -469,7 +469,7 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| #else /* HAVE_GETRLIMIT && HAVE_SETRLIMIT */ | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib519(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -46,19 +46,19 @@ static CURLcode test_lib519(const char *URL) | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| /* get first page */ | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| test_setopt(curl, CURLOPT_USERPWD, "anothermonster:inwardrobe"); | |
| /* get second page */ | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib520(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -44,12 +44,12 @@ static CURLcode test_lib520(const char *URL) | |
| test_setopt(curl, CURLOPT_FILETIME, 1L); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,23 +25,23 @@ | |
| static CURLcode test_lib521(const char *URL) | |
| { | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| CURL *curl; | |
| curl_off_t port; | |
| if(curlx_str_number(&libtest_arg2, &port, 0xffff)) | |
| - | return res; |
| + | return result; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| - | return res; |
| + | return result; |
| } | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| @@ -49,12 +49,12 @@ static CURLcode test_lib521(const char *URL) | |
| test_setopt(curl, CURLOPT_USERPWD, "xxx:yyy"); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib523(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -46,12 +46,12 @@ static CURLcode test_lib523(const char *URL) | |
| test_setopt(curl, CURLOPT_USERPWD, "xxx:yyy"); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib524(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -44,12 +44,12 @@ static CURLcode test_lib524(const char *URL) | |
| test_setopt(curl, CURLOPT_UPLOAD, 1L); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib525(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| char errbuf[STRERROR_LEN]; | |
| FILE *hd_src = NULL; | |
| @@ -61,9 +61,9 @@ static CURLcode test_lib525(const char *URL) | |
| } | |
| res_global_init(CURL_GLOBAL_ALL); | |
| - | if(res) { |
| + | if(result) { |
| curlx_fclose(hd_src); | |
| - | return res; |
| + | return result; |
| } | |
| easy_init(curl); | |
| @@ -146,5 +146,5 @@ test_cleanup: | |
| /* close the local file */ | |
| curlx_fclose(hd_src); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -44,7 +44,7 @@ | |
| static CURLcode test_lib526(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl[NUM_HANDLES]; | |
| int running; | |
| CURLM *multi = NULL; | |
| @@ -149,7 +149,7 @@ test_cleanup: | |
| cleanup'ed yet, in this case we have to cleanup them or otherwise these | |
| will be leaked, let's use undocumented cleanup sequence - type UB */ | |
| - | if(res != CURLE_OK) |
| + | if(result != CURLE_OK) |
| for(i = 0; i < CURL_ARRAYSIZE(curl); i++) | |
| curl_easy_cleanup(curl[i]); | |
| @@ -165,5 +165,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| } | |
| - | return res; |
| + | return result; |
| } | |
| @@ -251,13 +251,13 @@ static CURLMcode socket_action(CURLM *multi, curl_socket_t s, int evBitmask, | |
| const char *info) | |
| { | |
| int numhandles = 0; | |
| - | CURLMcode result = curl_multi_socket_action(multi, s, evBitmask, |
| + | CURLMcode mresult = curl_multi_socket_action(multi, s, evBitmask, |
| &numhandles); | |
| - | if(result != CURLM_OK) { |
| + | if(mresult != CURLM_OK) { |
| curl_mfprintf(stderr, "%s curl error on %s (%i) %s\n", | |
| - | t530_tag(), info, result, curl_multi_strerror(result)); |
| + | t530_tag(), info, mresult, curl_multi_strerror(mresult)); |
| } | |
| - | return result; |
| + | return mresult; |
| } | |
| /** | |
| @@ -268,20 +268,20 @@ static CURLMcode t530_checkFdSet(CURLM *multi, struct t530_Sockets *sockets, | |
| const char *name) | |
| { | |
| int i; | |
| - | CURLMcode result = CURLM_OK; |
| + | CURLMcode mresult = CURLM_OK; |
| for(i = 0; i < sockets->count; ++i) { | |
| if(FD_ISSET(sockets->sockets[i], fdset)) { | |
| - | result = socket_action(multi, sockets->sockets[i], evBitmask, name); |
| - | if(result) |
| + | mresult = socket_action(multi, sockets->sockets[i], evBitmask, name); |
| + | if(mresult) |
| break; | |
| } | |
| } | |
| - | return result; |
| + | return mresult; |
| } | |
| static CURLcode testone(const char *URL, int timer_fail_at, int socket_fail_at) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| struct t530_ReadWriteSockets sockets = { { NULL, 0, 0 }, { NULL, 0, 0 } }; | |
| @@ -298,8 +298,8 @@ static CURLcode testone(const char *URL, int timer_fail_at, int socket_fail_at) | |
| start_test_timing(); | |
| res_global_init(CURL_GLOBAL_ALL); | |
| - | if(res != CURLE_OK) |
| - | return res; |
| + | if(result != CURLE_OK) |
| + | return result; |
| easy_init(curl); | |
| @@ -320,7 +320,7 @@ static CURLcode testone(const char *URL, int timer_fail_at, int socket_fail_at) | |
| multi_add_handle(multi, curl); | |
| if(socket_action(multi, CURL_SOCKET_TIMEOUT, 0, "timeout")) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -351,12 +351,12 @@ static CURLcode testone(const char *URL, int timer_fail_at, int socket_fail_at) | |
| /* Check the sockets for reading / writing */ | |
| if(t530_checkFdSet(multi, &sockets.read, &readSet, CURL_CSELECT_IN, | |
| "read")) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| if(t530_checkFdSet(multi, &sockets.write, &writeSet, CURL_CSELECT_OUT, | |
| "write")) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -364,7 +364,7 @@ static CURLcode testone(const char *URL, int timer_fail_at, int socket_fail_at) | |
| t530_getMicroSecondTimeout(&timeout) == 0) { | |
| /* curl's timer has elapsed. */ | |
| if(socket_action(multi, CURL_SOCKET_TIMEOUT, 0, "timeout")) { | |
| - | res = TEST_ERR_BAD_TIMEOUT; |
| + | result = TEST_ERR_BAD_TIMEOUT; |
| goto test_cleanup; | |
| } | |
| } | |
| @@ -374,7 +374,7 @@ static CURLcode testone(const char *URL, int timer_fail_at, int socket_fail_at) | |
| if(!success) { | |
| t530_msg("Error getting file."); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| } | |
| test_cleanup: | |
| @@ -391,7 +391,7 @@ test_cleanup: | |
| curlx_free(sockets.write.sockets); | |
| t530_msg("done"); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode test_lib530(const char *URL) | |
| @@ -27,7 +27,7 @@ | |
| static CURLcode test_lib533(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| int running; | |
| CURLM *multi = NULL; | |
| @@ -102,5 +102,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -33,7 +33,7 @@ static void proxystat(CURL *curl) | |
| static CURLcode test_lib536(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl; | |
| struct curl_slist *host = NULL; | |
| @@ -62,12 +62,12 @@ static CURLcode test_lib536(const char *URL) | |
| test_setopt(curl, CURLOPT_NOPROXY, "goingdirect.com"); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(!res) { |
| + | result = curl_easy_perform(curl); |
| + | if(!result) { |
| proxystat(curl); | |
| test_setopt(curl, CURLOPT_URL, url_without_proxy); | |
| - | res = curl_easy_perform(curl); |
| - | if(!res) |
| + | result = curl_easy_perform(curl); |
| + | if(!result) |
| proxystat(curl); | |
| } | |
| @@ -77,5 +77,5 @@ test_cleanup: | |
| curl_slist_free_all(host); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -439,7 +439,7 @@ static int t537_test_rlimit(int keep_open) | |
| static CURLcode test_lib537(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(!strcmp(URL, "check")) { | |
| @@ -476,7 +476,7 @@ static CURLcode test_lib537(const char *URL) | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -484,7 +484,7 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| #else /* HAVE_GETRLIMIT && HAVE_SETRLIMIT */ | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib539(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| char *newURL = NULL; | |
| struct curl_slist *slist = NULL; | |
| @@ -49,8 +49,8 @@ static CURLcode test_lib539(const char *URL) | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| test_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_SINGLECWD); | |
| - | res = curl_easy_perform(curl); |
| - | if(res == CURLE_OK) { |
| + | result = curl_easy_perform(curl); |
| + | if(result == CURLE_OK) { |
| /* | |
| * Change the FTP_FILEMETHOD option to use full paths rather than a CWD | |
| * command. Use an innocuous QUOTE command, after which curl will CWD to | |
| @@ -71,7 +71,7 @@ static CURLcode test_lib539(const char *URL) | |
| test_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_NOCWD); | |
| test_setopt(curl, CURLOPT_QUOTE, slist); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| } | |
| test_cleanup: | |
| @@ -80,5 +80,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -37,45 +37,45 @@ static CURL *t540_curl[2]; | |
| static CURLcode init(int num, CURLM *multi, const char *url, | |
| const char *userpwd, struct curl_slist *headers) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| const char *proxy = libtest_arg2; | |
| res_easy_init(t540_curl[num]); | |
| - | if(res) |
| + | if(result) |
| goto init_failed; | |
| res_easy_setopt(t540_curl[num], CURLOPT_URL, url); | |
| - | if(res) |
| + | if(result) |
| goto init_failed; | |
| res_easy_setopt(t540_curl[num], CURLOPT_PROXY, proxy); | |
| - | if(res) |
| + | if(result) |
| goto init_failed; | |
| res_easy_setopt(t540_curl[num], CURLOPT_PROXYUSERPWD, userpwd); | |
| - | if(res) |
| + | if(result) |
| goto init_failed; | |
| res_easy_setopt(t540_curl[num], CURLOPT_PROXYAUTH, CURLAUTH_ANY); | |
| - | if(res) |
| + | if(result) |
| goto init_failed; | |
| res_easy_setopt(t540_curl[num], CURLOPT_VERBOSE, 1L); | |
| - | if(res) |
| + | if(result) |
| goto init_failed; | |
| res_easy_setopt(t540_curl[num], CURLOPT_HEADER, 1L); | |
| - | if(res) |
| + | if(result) |
| goto init_failed; | |
| /* custom Host: */ | |
| res_easy_setopt(t540_curl[num], CURLOPT_HTTPHEADER, headers); | |
| - | if(res) |
| + | if(result) |
| goto init_failed; | |
| res_multi_add_handle(multi, t540_curl[num]); | |
| - | if(res) |
| + | if(result) |
| goto init_failed; | |
| return CURLE_OK; /* success */ | |
| @@ -85,7 +85,7 @@ init_failed: | |
| curl_easy_cleanup(t540_curl[num]); | |
| t540_curl[num] = NULL; | |
| - | return res; /* failure */ |
| + | return result; /* failure */ |
| } | |
| static CURLcode loop(int num, CURLM *multi, const char *url, | |
| @@ -96,23 +96,23 @@ static CURLcode loop(int num, CURLM *multi, const char *url, | |
| int Q, U = -1; | |
| fd_set R, W, E; | |
| struct timeval T; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| - | res = init(num, multi, url, userpwd, headers); |
| - | if(res) |
| - | return res; |
| + | result = init(num, multi, url, userpwd, headers); |
| + | if(result) |
| + | return result; |
| while(U) { | |
| int M = -99; | |
| res_multi_perform(multi, &U); | |
| - | if(res) |
| - | return res; |
| + | if(result) |
| + | return result; |
| res_test_timedout(); | |
| - | if(res) |
| - | return res; |
| + | if(result) |
| + | return result; |
| if(U) { | |
| FD_ZERO(&R); | |
| @@ -120,14 +120,14 @@ static CURLcode loop(int num, CURLM *multi, const char *url, | |
| FD_ZERO(&E); | |
| res_multi_fdset(multi, &R, &W, &E, &M); | |
| - | if(res) |
| - | return res; |
| + | if(result) |
| + | return result; |
| /* At this point, M is guaranteed to be greater or equal than -1. */ | |
| res_multi_timeout(multi, &L); | |
| - | if(res) |
| - | return res; |
| + | if(result) |
| + | return result; |
| /* At this point, L is guaranteed to be greater or equal than -1. */ | |
| @@ -147,8 +147,8 @@ static CURLcode loop(int num, CURLM *multi, const char *url, | |
| } | |
| res_select_test(M + 1, &R, &W, &E, &T); | |
| - | if(res) |
| - | return res; |
| + | if(result) |
| + | return result; |
| } | |
| while(1) { | |
| @@ -174,8 +174,8 @@ static CURLcode loop(int num, CURLM *multi, const char *url, | |
| } | |
| res_test_timedout(); | |
| - | if(res) |
| - | return res; |
| + | if(result) |
| + | return result; |
| } | |
| return CURLE_OK; | |
| @@ -186,7 +186,7 @@ static CURLcode test_lib540(const char *URL) | |
| CURLM *multi = NULL; | |
| struct curl_slist *headers = NULL; | |
| char buffer[246]; /* naively fixed-size */ | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| size_t i; | |
| const char *proxyuserpws = libtest_arg3; | |
| @@ -211,25 +211,25 @@ static CURLcode test_lib540(const char *URL) | |
| } | |
| res_global_init(CURL_GLOBAL_ALL); | |
| - | if(res) { |
| + | if(result) { |
| curl_slist_free_all(headers); | |
| - | return res; |
| + | return result; |
| } | |
| res_multi_init(multi); | |
| - | if(res) { |
| + | if(result) { |
| curl_global_cleanup(); | |
| curl_slist_free_all(headers); | |
| - | return res; |
| + | return result; |
| } | |
| - | res = loop(0, multi, URL, proxyuserpws, headers); |
| - | if(res) |
| + | result = loop(0, multi, URL, proxyuserpws, headers); |
| + | if(result) |
| goto test_cleanup; | |
| curl_mfprintf(stderr, "lib540: now we do the request again\n"); | |
| - | res = loop(1, multi, URL, proxyuserpws, headers); |
| + | result = loop(1, multi, URL, proxyuserpws, headers); |
| test_cleanup: | |
| @@ -245,5 +245,5 @@ test_cleanup: | |
| curl_slist_free_all(headers); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -30,7 +30,7 @@ | |
| static CURLcode test_lib541(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| char errbuf[STRERROR_LEN]; | |
| FILE *hd_src; | |
| int hd; | |
| @@ -94,13 +94,13 @@ static CURLcode test_lib541(const char *URL) | |
| test_setopt(curl, CURLOPT_READDATA, hd_src); | |
| /* Now run off and do what you have been told! */ | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* and now upload the exact same again, but without rewinding so it already | |
| is at end of file */ | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -110,5 +110,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -30,7 +30,7 @@ | |
| static CURLcode test_lib542(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -58,12 +58,12 @@ static CURLcode test_lib542(const char *URL) | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| /* Now run off and do what you have been told! */ | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -34,14 +34,14 @@ static CURLcode test_lib543(const char *URL) | |
| }; | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| (void)URL; | |
| global_init(CURL_GLOBAL_ALL); | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| } | |
| else { | |
| int asize = (int)sizeof(a); | |
| @@ -67,5 +67,5 @@ static CURLcode test_lib543(const char *URL) | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib544(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| static const char teststring_init[] = { | |
| 'T', 'h', 'i', 's', '\0', ' ', 'i', 's', ' ', 't', 'e', 's', 't', ' ', | |
| @@ -74,7 +74,7 @@ static CURLcode test_lib544(const char *URL) | |
| } | |
| /* Now, this is a POST request with binary 0 embedded in POST data. */ | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -82,5 +82,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -64,7 +64,7 @@ static curlioerr t547_ioctl_callback(CURL *curl, int cmd, void *clientp) | |
| static CURLcode test_lib547(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| int counter = 0; | |
| @@ -104,12 +104,12 @@ static CURLcode test_lib547(const char *URL) | |
| test_setopt(curl, CURLOPT_PROXYAUTH, | |
| CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -30,7 +30,7 @@ | |
| static CURLcode test_lib549(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -54,12 +54,12 @@ static CURLcode test_lib549(const char *URL) | |
| test_setopt(curl, CURLOPT_TRANSFERTEXT, 1L); | |
| } | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -69,7 +69,7 @@ static curlioerr ioctl_callback(CURL *curl, int cmd, void *clientp) | |
| static CURLcode test_lib552(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| size_t i; | |
| static const char fill[] = "test data"; | |
| @@ -109,11 +109,11 @@ static CURLcode test_lib552(const char *URL) | |
| might work too, not NTLM */ | |
| test_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -58,7 +58,7 @@ static CURLcode test_lib553(const char *URL) | |
| static char testbuf[SIZE_HEADERS + 100]; | |
| CURL *curl; | |
| - | CURLcode res = CURLE_FAILED_INIT; |
| + | CURLcode result = CURLE_FAILED_INIT; |
| int i; | |
| struct curl_slist *headerlist = NULL, *hl; | |
| @@ -97,7 +97,7 @@ static CURLcode test_lib553(const char *URL) | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| test_setopt(curl, CURLOPT_READFUNCTION, myreadfunc); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -107,5 +107,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -60,7 +60,7 @@ static CURLcode t554_test_once(const char *URL, bool oldstyle) | |
| "this is what we post to the silly web server\n"; | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLFORMcode formrc; | |
| struct curl_httppost *formpost = NULL; | |
| @@ -176,8 +176,8 @@ static CURLcode t554_test_once(const char *URL, bool oldstyle) | |
| /* include headers in the output */ | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -187,23 +187,23 @@ test_cleanup: | |
| /* now cleanup the formpost chain */ | |
| curl_formfree(formpost); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode test_lib554(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | res = t554_test_once(URL, TRUE); /* old */ |
| - | if(!res) |
| - | res = t554_test_once(URL, FALSE); /* new */ |
| + | result = t554_test_once(URL, TRUE); /* old */ |
| + | if(!result) |
| + | result = t554_test_once(URL, FALSE); /* new */ |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -68,7 +68,7 @@ static curlioerr t555_ioctl_callback(CURL *curl, int cmd, void *clientp) | |
| static CURLcode test_lib555(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| int counter = 0; | |
| CURLM *multi = NULL; | |
| @@ -141,5 +141,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib556(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| int transfers = 0; | |
| @@ -47,9 +47,9 @@ static CURLcode test_lib556(const char *URL) | |
| again: | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| - | if(!res) { |
| + | if(!result) { |
| /* we are connected, now get an HTTP document the raw way */ | |
| char request[64]; | |
| const char *sbuf = request; | |
| @@ -64,8 +64,8 @@ again: | |
| char buf[1024]; | |
| if(sblen) { | |
| - | res = curl_easy_send(curl, sbuf, sblen, &nwritten); |
| - | if(res && res != CURLE_AGAIN) |
| + | result = curl_easy_send(curl, sbuf, sblen, &nwritten); |
| + | if(result && result != CURLE_AGAIN) |
| break; | |
| if(nwritten > 0) { | |
| sbuf += nwritten; | |
| @@ -74,7 +74,7 @@ again: | |
| } | |
| /* busy-read like crazy */ | |
| - | res = curl_easy_recv(curl, buf, sizeof(buf), &nread); |
| + | result = curl_easy_recv(curl, buf, sizeof(buf), &nread); |
| if(nread) { | |
| /* send received stuff to stdout */ | |
| @@ -82,21 +82,21 @@ again: | |
| char errbuf[STRERROR_LEN]; | |
| curl_mfprintf(stderr, "write() failed: errno %d (%s)\n", | |
| errno, curlx_strerror(errno, errbuf, sizeof(errbuf))); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| break; | |
| } | |
| } | |
| - | } while((res == CURLE_OK && nread) || (res == CURLE_AGAIN)); |
| + | } while((result == CURLE_OK && nread) || (result == CURLE_AGAIN)); |
| - | if(res && res != CURLE_AGAIN) |
| - | res = TEST_ERR_FAILURE; |
| + | if(result && result != CURLE_AGAIN) |
| + | result = TEST_ERR_FAILURE; |
| } | |
| if(testnum == 696) { | |
| ++transfers; | |
| /* perform the transfer a second time */ | |
| - | if(!res && transfers == 1) |
| + | if(!result && transfers == 1) |
| goto again; | |
| } | |
| @@ -105,5 +105,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -27,7 +27,7 @@ static CURLcode test_lib558(const char *URL) | |
| { | |
| unsigned char a[] = { 0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, | |
| 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7 }; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| char *ptr = NULL; | |
| int asize; | |
| @@ -48,5 +48,5 @@ static CURLcode test_lib558(const char *URL) | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib559(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -44,11 +44,11 @@ static CURLcode test_lib559(const char *URL) | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| test_setopt(curl, CURLOPT_BUFFERSIZE, 1L); /* the smallest! */ | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -37,7 +37,7 @@ static CURLcode test_lib560(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int still_running; /* keep number of running handles */ | |
| @@ -105,5 +105,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -33,16 +33,16 @@ | |
| static CURLcode test_lib562(const char *URL) | |
| { | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| CURL *curl; | |
| curl_off_t port; | |
| if(curlx_str_number(&libtest_arg2, &port, 0xffff)) | |
| - | return res; |
| + | return result; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| - | return res; |
| + | return result; |
| } | |
| /* get a curl handle */ | |
| @@ -50,7 +50,7 @@ static CURLcode test_lib562(const char *URL) | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| /* enable verbose */ | |
| @@ -63,12 +63,12 @@ static CURLcode test_lib562(const char *URL) | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| /* Now run off and do what you have been told! */ | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -27,7 +27,7 @@ | |
| static CURLcode test_lib564(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| int running; | |
| CURLM *multi = NULL; | |
| @@ -90,5 +90,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib566(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| double content_length = 3; | |
| @@ -45,12 +45,12 @@ static CURLcode test_lib566(const char *URL) | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| - | if(!res) { |
| + | if(!result) { |
| FILE *moo; | |
| - | res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, |
| - | &content_length); |
| + | result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, |
| + | &content_length); |
| moo = curlx_fopen(libtest_arg2, "wb"); | |
| if(moo) { | |
| @@ -64,5 +64,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -28,7 +28,7 @@ | |
| */ | |
| static CURLcode test_lib567(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| struct curl_slist *custom_headers = NULL; | |
| @@ -57,7 +57,7 @@ static CURLcode test_lib567(const char *URL) | |
| custom_headers = curl_slist_append(custom_headers, "Test-Number: 567"); | |
| test_setopt(curl, CURLOPT_RTSPHEADER, custom_headers); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -66,5 +66,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -30,7 +30,7 @@ | |
| */ | |
| static CURLcode test_lib568(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| int sdp; | |
| FILE *sdpf = NULL; | |
| @@ -58,7 +58,7 @@ static CURLcode test_lib568(const char *URL) | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -68,7 +68,7 @@ static CURLcode test_lib568(const char *URL) | |
| sdp = curlx_open(libtest_arg2, O_RDONLY); | |
| if(sdp == -1) { | |
| curl_mfprintf(stderr, "cannot open %s\n", libtest_arg2); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| fstat(sdp, &file_info); | |
| @@ -77,7 +77,7 @@ static CURLcode test_lib568(const char *URL) | |
| sdpf = curlx_fopen(libtest_arg2, "rb"); | |
| if(!sdpf) { | |
| curl_mfprintf(stderr, "cannot fopen %s\n", libtest_arg2); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_ANNOUNCE); | |
| @@ -88,8 +88,8 @@ static CURLcode test_lib568(const char *URL) | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| /* Do the ANNOUNCE */ | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| test_setopt(curl, CURLOPT_UPLOAD, 0L); | |
| @@ -99,7 +99,7 @@ static CURLcode test_lib568(const char *URL) | |
| /* Make sure we can do a normal request now */ | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -107,15 +107,15 @@ static CURLcode test_lib568(const char *URL) | |
| stream_uri = NULL; | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_DESCRIBE); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* Now do a POST style one */ | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -125,7 +125,7 @@ static CURLcode test_lib568(const char *URL) | |
| custom_headers = curl_slist_append(custom_headers, | |
| "Content-Type: posty goodness"); | |
| if(!custom_headers) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSPHEADER, custom_headers); | |
| @@ -133,8 +133,8 @@ static CURLcode test_lib568(const char *URL) | |
| test_setopt(curl, CURLOPT_POSTFIELDS, | |
| "postyfield=postystuff&project=curl\n"); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| test_setopt(curl, CURLOPT_POSTFIELDS, NULL); | |
| @@ -145,7 +145,7 @@ static CURLcode test_lib568(const char *URL) | |
| /* Make sure we can do a normal request now */ | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -153,7 +153,7 @@ static CURLcode test_lib568(const char *URL) | |
| stream_uri = NULL; | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -168,5 +168,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -30,7 +30,7 @@ | |
| */ | |
| static CURLcode test_lib569(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| char *stream_uri = NULL; | |
| char *rtsp_session_id; | |
| @@ -64,11 +64,11 @@ static CURLcode test_lib569(const char *URL) | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP); | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_BAD_FUNCTION_ARGUMENT) { |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_BAD_FUNCTION_ARGUMENT) { |
| curl_mfprintf(stderr, "This should have failed. " | |
| "Cannot setup without a Transport: header"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -76,7 +76,7 @@ static CURLcode test_lib569(const char *URL) | |
| for(i = 0; i < 3; i++) { | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -86,8 +86,8 @@ static CURLcode test_lib569(const char *URL) | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP); | |
| test_setopt(curl, CURLOPT_RTSP_TRANSPORT, | |
| "Fake/NotReal/JustATest;foo=baz"); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| curl_easy_getinfo(curl, CURLINFO_RTSP_SESSION_ID, &rtsp_session_id); | |
| @@ -96,7 +96,7 @@ static CURLcode test_lib569(const char *URL) | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -104,8 +104,8 @@ static CURLcode test_lib569(const char *URL) | |
| stream_uri = NULL; | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_TEARDOWN); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* Clear for the next go-round */ | |
| @@ -121,5 +121,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -27,7 +27,7 @@ | |
| static CURLcode test_lib570(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| int request = 1; | |
| char *stream_uri = NULL; | |
| @@ -54,17 +54,17 @@ static CURLcode test_lib570(const char *URL) | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| curl_free(stream_uri); | |
| stream_uri = NULL; | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_RTSP_CSEQ_ERROR) { |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_RTSP_CSEQ_ERROR) { |
| curl_mfprintf(stderr, "Failed to detect CSeq mismatch"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -75,35 +75,35 @@ static CURLcode test_lib570(const char *URL) | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| curl_free(stream_uri); | |
| stream_uri = NULL; | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_PLAY); | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| curl_free(stream_uri); | |
| stream_uri = NULL; | |
| - | res = curl_easy_perform(curl); |
| - | if(res == CURLE_RTSP_SESSION_ERROR) { |
| - | res = CURLE_OK; |
| + | result = curl_easy_perform(curl); |
| + | if(result == CURLE_RTSP_SESSION_ERROR) { |
| + | result = CURLE_OK; |
| } | |
| else { | |
| curl_mfprintf(stderr, "Failed to detect a Session ID mismatch"); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| } | |
| test_cleanup: | |
| @@ -112,5 +112,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -89,7 +89,7 @@ static size_t rtp_write(char *data, size_t size, size_t nmemb, void *stream) | |
| static CURLcode test_lib571(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| char *stream_uri = NULL; | |
| int request = 1; | |
| @@ -117,7 +117,7 @@ static CURLcode test_lib571(const char *URL) | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -132,14 +132,14 @@ static CURLcode test_lib571(const char *URL) | |
| test_setopt(curl, CURLOPT_RTSP_TRANSPORT, "RTP/AVP/TCP;interleaved=0-1"); | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* This PLAY starts the interleave */ | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -147,14 +147,14 @@ static CURLcode test_lib571(const char *URL) | |
| stream_uri = NULL; | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_PLAY); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* The DESCRIBE request will try to consume data after the Content */ | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -162,13 +162,13 @@ static CURLcode test_lib571(const char *URL) | |
| stream_uri = NULL; | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_DESCRIBE); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -176,17 +176,17 @@ static CURLcode test_lib571(const char *URL) | |
| stream_uri = NULL; | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_PLAY); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| curl_mfprintf(stderr, "PLAY COMPLETE\n"); | |
| /* Use Receive to get the rest of the data */ | |
| - | while(!res && rtp_packet_count < 19) { |
| + | while(!result && rtp_packet_count < 19) { |
| curl_mfprintf(stderr, "LOOPY LOOP!\n"); | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_RECEIVE); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| } | |
| test_cleanup: | |
| @@ -198,5 +198,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -30,7 +30,7 @@ | |
| */ | |
| static CURLcode test_lib572(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| int params; | |
| FILE *paramsf = NULL; | |
| @@ -60,7 +60,7 @@ static CURLcode test_lib572(const char *URL) | |
| /* SETUP */ | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -69,13 +69,13 @@ static CURLcode test_lib572(const char *URL) | |
| test_setopt(curl, CURLOPT_RTSP_TRANSPORT, "Planes/Trains/Automobiles"); | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -86,7 +86,7 @@ static CURLcode test_lib572(const char *URL) | |
| params = curlx_open(libtest_arg2, O_RDONLY); | |
| if(params == -1) { | |
| curl_mfprintf(stderr, "cannot open %s\n", libtest_arg2); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| fstat(params, &file_info); | |
| @@ -95,7 +95,7 @@ static CURLcode test_lib572(const char *URL) | |
| paramsf = curlx_fopen(libtest_arg2, "rb"); | |
| if(!paramsf) { | |
| curl_mfprintf(stderr, "cannot fopen %s\n", libtest_arg2); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_GET_PARAMETER); | |
| @@ -104,8 +104,8 @@ static CURLcode test_lib572(const char *URL) | |
| test_setopt(curl, CURLOPT_UPLOAD, 1L); | |
| test_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)file_info.st_size); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| test_setopt(curl, CURLOPT_UPLOAD, 0L); | |
| @@ -115,22 +115,22 @@ static CURLcode test_lib572(const char *URL) | |
| /* Heartbeat GET_PARAMETERS */ | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| curl_free(stream_uri); | |
| stream_uri = NULL; | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* POST GET_PARAMETERS */ | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -140,8 +140,8 @@ static CURLcode test_lib572(const char *URL) | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_GET_PARAMETER); | |
| test_setopt(curl, CURLOPT_POSTFIELDS, "packets_received\njitter\n"); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| test_setopt(curl, CURLOPT_POSTFIELDS, NULL); | |
| @@ -149,7 +149,7 @@ static CURLcode test_lib572(const char *URL) | |
| /* Make sure we can do a normal request now */ | |
| stream_uri = tutil_suburl(URL, request++); | |
| if(!stream_uri) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); | |
| @@ -157,7 +157,7 @@ static CURLcode test_lib572(const char *URL) | |
| stream_uri = NULL; | |
| test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -172,5 +172,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -33,7 +33,7 @@ static CURLcode test_lib573(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int running = 1; | |
| double connect_time = 0.0; | |
| double dbl_epsilon; | |
| @@ -94,7 +94,7 @@ static CURLcode test_lib573(const char *URL) | |
| if(connect_time < dbl_epsilon) { | |
| curl_mfprintf(stderr, "connect time %e is < epsilon %e\n", | |
| connect_time, dbl_epsilon); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| } | |
| test_cleanup: | |
| @@ -106,5 +106,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -33,7 +33,7 @@ static int new_fnmatch(void *ptr, const char *pattern, const char *string) | |
| static CURLcode test_lib574(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -53,19 +53,19 @@ static CURLcode test_lib574(const char *URL) | |
| test_setopt(curl, CURLOPT_FNMATCH_FUNCTION, new_fnmatch); | |
| test_setopt(curl, CURLOPT_TIMEOUT_MS, (long)TEST_HANG_TIMEOUT); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| - | curl_mfprintf(stderr, "curl_easy_perform() failed %d\n", res); |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| + | curl_mfprintf(stderr, "curl_easy_perform() failed %d\n", result); |
| goto test_cleanup; | |
| } | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| - | curl_mfprintf(stderr, "curl_easy_perform() failed %d\n", res); |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| + | curl_mfprintf(stderr, "curl_easy_perform() failed %d\n", result); |
| goto test_cleanup; | |
| } | |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -34,7 +34,7 @@ static CURLcode test_lib575(const char *URL) | |
| CURL *curl = NULL; | |
| CURL *curldupe = NULL; | |
| CURLM *multi = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int still_running = 0; | |
| start_test_timing(); | |
| @@ -47,12 +47,12 @@ static CURLcode test_lib575(const char *URL) | |
| easy_setopt(curl, CURLOPT_WILDCARDMATCH, 1L); | |
| easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| curldupe = curl_easy_duphandle(curl); | |
| @@ -104,5 +104,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -97,12 +97,12 @@ static long chunk_end(void *ptr) | |
| static CURLcode test_lib576(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct chunk_data chunk_data = { 0, 0 }; | |
| curl_global_init(CURL_GLOBAL_ALL); | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| - | res = CURLE_OUT_OF_MEMORY; |
| + | result = CURLE_OUT_OF_MEMORY; |
| goto test_cleanup; | |
| } | |
| @@ -112,11 +112,11 @@ static CURLcode test_lib576(const char *URL) | |
| test_setopt(curl, CURLOPT_CHUNK_END_FUNCTION, chunk_end); | |
| test_setopt(curl, CURLOPT_CHUNK_DATA, &chunk_data); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| if(curl) | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -51,7 +51,7 @@ static int t578_progress_callback(void *clientp, double dltotal, double dlnow, | |
| static CURLcode test_lib578(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -85,8 +85,8 @@ static CURLcode test_lib578(const char *URL) | |
| /* include headers in the output */ | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -94,5 +94,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -101,7 +101,7 @@ static size_t t579_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| static CURLcode test_lib579(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| struct curl_slist *slist = NULL; | |
| struct t579_WriteThis pooh; | |
| pooh.counter = 0; | |
| @@ -154,8 +154,8 @@ static CURLcode test_lib579(const char *URL) | |
| test_setopt(curl, CURLOPT_NOPROGRESS, 0L); | |
| test_setopt(curl, CURLOPT_PROGRESSFUNCTION, t579_progress_callback); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| progress_final_report(); | |
| @@ -169,5 +169,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -198,11 +198,11 @@ static void notifyCurl(CURLM *multi, curl_socket_t s, int evBitmask, | |
| const char *info) | |
| { | |
| int numhandles = 0; | |
| - | CURLMcode result = curl_multi_socket_action(multi, s, evBitmask, |
| - | &numhandles); |
| - | if(result != CURLM_OK) { |
| + | CURLMcode mresult = curl_multi_socket_action(multi, s, evBitmask, |
| + | &numhandles); |
| + | if(mresult != CURLM_OK) { |
| curl_mfprintf(stderr, "curl error on %s (%i) %s\n", | |
| - | info, result, curl_multi_strerror(result)); |
| + | info, mresult, curl_multi_strerror(mresult)); |
| } | |
| } | |
| @@ -222,7 +222,7 @@ static void t582_checkFdSet(CURLM *multi, struct t582_Sockets *sockets, | |
| static CURLcode test_lib582(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| char errbuf[STRERROR_LEN]; | |
| FILE *hd_src = NULL; | |
| @@ -265,9 +265,9 @@ static CURLcode test_lib582(const char *URL) | |
| (curl_off_t)file_info.st_size); | |
| res_global_init(CURL_GLOBAL_ALL); | |
| - | if(res != CURLE_OK) { |
| + | if(result != CURLE_OK) { |
| curlx_fclose(hd_src); | |
| - | return res; |
| + | return result; |
| } | |
| easy_init(curl); | |
| @@ -341,7 +341,7 @@ static CURLcode test_lib582(const char *URL) | |
| if(!success) { | |
| curl_mfprintf(stderr, "Error uploading file.\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| } | |
| test_cleanup: | |
| @@ -360,5 +360,5 @@ test_cleanup: | |
| curlx_free(sockets.read.sockets); | |
| curlx_free(sockets.write.sockets); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -33,8 +33,8 @@ static CURLcode test_lib583(const char *URL) | |
| int stillRunning; | |
| CURLM *multi = NULL; | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| - | CURLMcode mres; |
| + | CURLcode result = CURLE_OK; |
| + | CURLMcode mresult; |
| assert(test_argc >= 4); | |
| @@ -66,11 +66,11 @@ static CURLcode test_lib583(const char *URL) | |
| curl_mfprintf(stderr, "curl_multi_perform() succeeded\n"); | |
| curl_mfprintf(stderr, "curl_multi_remove_handle()...\n"); | |
| - | mres = curl_multi_remove_handle(multi, curl); |
| - | if(mres) { |
| + | mresult = curl_multi_remove_handle(multi, curl); |
| + | if(mresult) { |
| curl_mfprintf(stderr, "curl_multi_remove_handle() failed, with code %d\n", | |
| - | mres); |
| - | res = TEST_ERR_MULTI; |
| + | mresult); |
| + | result = TEST_ERR_MULTI; |
| } | |
| else | |
| curl_mfprintf(stderr, "curl_multi_remove_handle() succeeded\n"); | |
| @@ -83,5 +83,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -130,7 +130,7 @@ static void *t586_test_fire(void *ptr) | |
| /* test function */ | |
| static CURLcode test_lib586(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLSHcode scode = CURLSHE_OK; | |
| struct t586_Tdata tdata; | |
| CURL *curl; | |
| @@ -208,7 +208,7 @@ static CURLcode test_lib586(const char *URL) | |
| test_setopt(curl, CURLOPT_SHARE, share); | |
| curl_mprintf("PERFORM\n"); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| /* try to free share, expect to fail because share is in use */ | |
| curl_mprintf("try SHARE_CLEANUP...\n"); | |
| @@ -236,5 +236,5 @@ test_cleanup: | |
| curl_mprintf("GLOBAL_CLEANUP\n"); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib589(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -51,16 +51,16 @@ static CURLcode test_lib589(const char *URL) | |
| curl_mime_name(part, "fake"); | |
| curl_mime_data(part, "party", 5); | |
| test_setopt(curl, CURLOPT_MIMEPOST, mime); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| curl_mime_free(mime); | |
| - | if(res) |
| + | if(result) |
| goto test_cleanup; | |
| } | |
| test_setopt(curl, CURLOPT_MIMEPOST, NULL); | |
| /* Now, we should be making a zero byte POST request */ | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -68,5 +68,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -39,7 +39,7 @@ | |
| static CURLcode test_lib590(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| long usedauth = 0; | |
| @@ -66,11 +66,11 @@ static CURLcode test_lib590(const char *URL) | |
| test_setopt(curl, CURLOPT_PROXYPASSWORD, "password"); | |
| test_setopt(curl, CURLOPT_PROXYUSERPWD, "me:password"); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| - | res = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_USED, &usedauth); |
| + | result = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_USED, &usedauth); |
| if(CURLAUTH_NTLM != usedauth) { | |
| curl_mprintf("CURLINFO_PROXYAUTH_USED did not say NTLM\n"); | |
| } | |
| @@ -80,5 +80,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -29,7 +29,7 @@ static CURLcode test_lib591(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int running; | |
| int msgs_left; | |
| CURLMsg *msg; | |
| @@ -51,9 +51,9 @@ static CURLcode test_lib591(const char *URL) | |
| } | |
| res_global_init(CURL_GLOBAL_ALL); | |
| - | if(res) { |
| + | if(result) { |
| curlx_fclose(upload); | |
| - | return res; |
| + | return result; |
| } | |
| easy_init(curl); | |
| @@ -129,7 +129,7 @@ static CURLcode test_lib591(const char *URL) | |
| msg = curl_multi_info_read(multi, &msgs_left); | |
| if(msg) | |
| - | res = msg->data.result; |
| + | result = msg->data.result; |
| test_cleanup: | |
| @@ -142,5 +142,5 @@ test_cleanup: | |
| /* close the local file */ | |
| curlx_fclose(upload); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -36,7 +36,7 @@ static CURLcode test_lib597(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| int running; | |
| int msgs_left; | |
| CURLMsg *msg; | |
| @@ -109,7 +109,7 @@ static CURLcode test_lib597(const char *URL) | |
| msg = curl_multi_info_read(multi, &msgs_left); | |
| if(msg) | |
| - | res = msg->data.result; |
| + | result = msg->data.result; |
| multi_remove_handle(multi, curl); | |
| @@ -121,5 +121,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib598(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -47,8 +47,8 @@ static CURLcode test_lib598(const char *URL) | |
| test_setopt(curl, CURLOPT_COOKIE, "name=moo"); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, "retrieve 1 failed\n"); | |
| goto test_cleanup; | |
| } | |
| @@ -59,8 +59,8 @@ static CURLcode test_lib598(const char *URL) | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| curl_mfprintf(stderr, "retrieve 2 failed\n"); | |
| test_cleanup: | |
| @@ -68,5 +68,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -42,7 +42,7 @@ static int t599_progress_callback(void *clientp, double dltotal, | |
| static CURLcode test_lib599(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| double content_length = 0.0; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -73,12 +73,12 @@ static CURLcode test_lib599(const char *URL) | |
| /* include headers in the output */ | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| - | if(!res) { |
| + | if(!result) { |
| FILE *moo; | |
| - | res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, |
| + | result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, |
| &content_length); | |
| moo = curlx_fopen(libtest_arg2, "wb"); | |
| if(moo) { | |
| @@ -93,5 +93,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -59,7 +59,7 @@ static CURLcode t643_test_once(const char *URL, bool oldstyle) | |
| static const char testdata[] = "dummy\n"; | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| curl_mime *mime = NULL; | |
| curl_mimepart *part = NULL; | |
| @@ -98,23 +98,25 @@ static CURLcode t643_test_once(const char *URL, bool oldstyle) | |
| /* Fill in the file upload part */ | |
| if(oldstyle) { | |
| - | res = curl_mime_name(part, "sendfile"); |
| - | if(!res) |
| - | res = curl_mime_data_cb(part, datasize, t643_read_cb, NULL, NULL, &pooh); |
| - | if(!res) |
| - | res = curl_mime_filename(part, "postit2.c"); |
| + | result = curl_mime_name(part, "sendfile"); |
| + | if(!result) |
| + | result = curl_mime_data_cb(part, datasize, t643_read_cb, NULL, NULL, |
| + | &pooh); |
| + | if(!result) |
| + | result = curl_mime_filename(part, "postit2.c"); |
| } | |
| else { | |
| /* new style */ | |
| - | res = curl_mime_name(part, "sendfile alternative"); |
| - | if(!res) |
| - | res = curl_mime_data_cb(part, datasize, t643_read_cb, NULL, NULL, &pooh); |
| - | if(!res) |
| - | res = curl_mime_filename(part, "filename 2 "); |
| + | result = curl_mime_name(part, "sendfile alternative"); |
| + | if(!result) |
| + | result = curl_mime_data_cb(part, datasize, t643_read_cb, NULL, NULL, |
| + | &pooh); |
| + | if(!result) |
| + | result = curl_mime_filename(part, "filename 2 "); |
| } | |
| - | if(res) |
| - | curl_mprintf("curl_mime_xxx(1) = %s\n", curl_easy_strerror(res)); |
| + | if(result) |
| + | curl_mprintf("curl_mime_xxx(1) = %s\n", curl_easy_strerror(result)); |
| /* Now add the same data with another name and make it not look like | |
| a file upload but still using the callback */ | |
| @@ -133,12 +135,13 @@ static CURLcode t643_test_once(const char *URL, bool oldstyle) | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| /* Fill in the file upload part */ | |
| - | res = curl_mime_name(part, "callbackdata"); |
| - | if(!res) |
| - | res = curl_mime_data_cb(part, datasize, t643_read_cb, NULL, NULL, &pooh2); |
| + | result = curl_mime_name(part, "callbackdata"); |
| + | if(!result) |
| + | result = curl_mime_data_cb(part, datasize, t643_read_cb, NULL, NULL, |
| + | &pooh2); |
| - | if(res) |
| - | curl_mprintf("curl_mime_xxx(2) = %s\n", curl_easy_strerror(res)); |
| + | if(result) |
| + | curl_mprintf("curl_mime_xxx(2) = %s\n", curl_easy_strerror(result)); |
| part = curl_mime_addpart(mime); | |
| if(!part) { | |
| @@ -150,12 +153,12 @@ static CURLcode t643_test_once(const char *URL, bool oldstyle) | |
| } | |
| /* Fill in the filename field */ | |
| - | res = curl_mime_name(part, "filename"); |
| - | if(!res) |
| - | res = curl_mime_data(part, "postit2.c", CURL_ZERO_TERMINATED); |
| + | result = curl_mime_name(part, "filename"); |
| + | if(!result) |
| + | result = curl_mime_data(part, "postit2.c", CURL_ZERO_TERMINATED); |
| - | if(res) |
| - | curl_mprintf("curl_mime_xxx(3) = %s\n", curl_easy_strerror(res)); |
| + | if(result) |
| + | curl_mprintf("curl_mime_xxx(3) = %s\n", curl_easy_strerror(result)); |
| /* Fill in a submit field too */ | |
| part = curl_mime_addpart(mime); | |
| @@ -166,12 +169,12 @@ static CURLcode t643_test_once(const char *URL, bool oldstyle) | |
| curl_global_cleanup(); | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | res = curl_mime_name(part, "submit"); |
| - | if(!res) |
| - | res = curl_mime_data(part, "send", CURL_ZERO_TERMINATED); |
| + | result = curl_mime_name(part, "submit"); |
| + | if(!result) |
| + | result = curl_mime_data(part, "send", CURL_ZERO_TERMINATED); |
| - | if(res) |
| - | curl_mprintf("curl_mime_xxx(4) = %s\n", curl_easy_strerror(res)); |
| + | if(result) |
| + | curl_mprintf("curl_mime_xxx(4) = %s\n", curl_easy_strerror(result)); |
| part = curl_mime_addpart(mime); | |
| if(!part) { | |
| @@ -181,14 +184,14 @@ static CURLcode t643_test_once(const char *URL, bool oldstyle) | |
| curl_global_cleanup(); | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | res = curl_mime_name(part, "somename"); |
| - | if(!res) |
| - | res = curl_mime_filename(part, "somefile.txt"); |
| - | if(!res) |
| - | res = curl_mime_data(part, "blah blah", 9); |
| + | result = curl_mime_name(part, "somename"); |
| + | if(!result) |
| + | result = curl_mime_filename(part, "somefile.txt"); |
| + | if(!result) |
| + | result = curl_mime_data(part, "blah blah", 9); |
| - | if(res) |
| - | curl_mprintf("curl_mime_xxx(5) = %s\n", curl_easy_strerror(res)); |
| + | if(result) |
| + | curl_mprintf("curl_mime_xxx(5) = %s\n", curl_easy_strerror(result)); |
| /* First set the URL that is about to receive our POST. */ | |
| test_setopt(curl, CURLOPT_URL, URL); | |
| @@ -202,8 +205,8 @@ static CURLcode t643_test_once(const char *URL, bool oldstyle) | |
| /* include headers in the output */ | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -213,7 +216,7 @@ test_cleanup: | |
| /* now cleanup the mimepost structure */ | |
| curl_mime_free(mime); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode t643_cyclic_add(void) | |
| @@ -242,21 +245,21 @@ static CURLcode t643_cyclic_add(void) | |
| static CURLcode test_lib643(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | res = t643_test_once(URL, TRUE); /* old */ |
| - | if(!res) |
| - | res = t643_test_once(URL, FALSE); /* new */ |
| + | result = t643_test_once(URL, TRUE); /* old */ |
| + | if(!result) |
| + | result = t643_test_once(URL, FALSE); /* new */ |
| - | if(!res) |
| - | res = t643_cyclic_add(); |
| + | if(!result) |
| + | result = t643_cyclic_add(); |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -40,7 +40,7 @@ static size_t count_chars(void *userp, const char *buf, size_t len) | |
| static CURLcode test_lib650(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = TEST_ERR_MAJOR_BAD; |
| + | CURLcode result = TEST_ERR_MAJOR_BAD; |
| CURLFORMcode formrc; | |
| struct curl_slist *headers, *headers2 = NULL; | |
| struct curl_httppost *formpost = NULL; | |
| @@ -189,8 +189,8 @@ static CURLcode test_lib650(const char *URL) | |
| /* include headers in the output */ | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -203,5 +203,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -28,7 +28,7 @@ static CURLcode test_lib651(const char *URL) | |
| static char testbuf[17000]; /* more than 16K */ | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLFORMcode formrc; | |
| struct curl_httppost *formpost = NULL; | |
| struct curl_httppost *lastptr = NULL; | |
| @@ -75,8 +75,8 @@ static CURLcode test_lib651(const char *URL) | |
| /* include headers in the output */ | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -88,5 +88,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -28,7 +28,7 @@ static CURLcode test_lib652(const char *URL) | |
| static char testbuf[17000]; /* more than 16K */ | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| curl_mime *mime = NULL; | |
| curl_mimepart *part; | |
| struct curl_slist *recipients = NULL; | |
| @@ -48,7 +48,7 @@ static CURLcode test_lib652(const char *URL) | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -56,32 +56,32 @@ static CURLcode test_lib652(const char *URL) | |
| mime = curl_mime_init(curl); | |
| if(!mime) { | |
| curl_mfprintf(stderr, "curl_mime_init() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| part = curl_mime_addpart(mime); | |
| if(!part) { | |
| curl_mfprintf(stderr, "curl_mime_addpart() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| - | res = curl_mime_filename(part, "myfile.jpg"); |
| - | if(res) { |
| + | result = curl_mime_filename(part, "myfile.jpg"); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_mime_filename() failed\n"); | |
| goto test_cleanup; | |
| } | |
| - | res = curl_mime_type(part, "image/jpeg"); |
| - | if(res) { |
| + | result = curl_mime_type(part, "image/jpeg"); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_mime_type() failed\n"); | |
| goto test_cleanup; | |
| } | |
| - | res = curl_mime_data(part, testbuf, sizeof(testbuf)); |
| - | if(res) { |
| + | result = curl_mime_data(part, testbuf, sizeof(testbuf)); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_mime_data() failed\n"); | |
| goto test_cleanup; | |
| } | |
| - | res = curl_mime_encoder(part, "base64"); |
| - | if(res) { |
| + | result = curl_mime_encoder(part, "base64"); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_mime_encoder() failed\n"); | |
| goto test_cleanup; | |
| } | |
| @@ -111,8 +111,8 @@ static CURLcode test_lib652(const char *URL) | |
| /* get verbose debug output please */ | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -127,5 +127,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -26,7 +26,7 @@ | |
| static CURLcode test_lib653(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| curl_mimepart *field = NULL; | |
| curl_mime *mime = NULL; | |
| @@ -44,17 +44,17 @@ static CURLcode test_lib653(const char *URL) | |
| easy_setopt(curl, CURLOPT_MIMEPOST, mime); | |
| easy_setopt(curl, CURLOPT_NOPROGRESS, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* Alter form and resubmit. */ | |
| curl_mime_data(field, "long value for length change", CURL_ZERO_TERMINATED); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_mime_free(mime); | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; /* return the final return code */ |
| + | return result; /* return the final return code */ |
| } | |
| @@ -66,7 +66,7 @@ static CURLcode test_lib654(const char *URL) | |
| curl_mime *mime = NULL; | |
| curl_mimepart *part; | |
| struct curl_slist *hdrs = NULL; | |
| - | CURLcode res = TEST_ERR_FAILURE; |
| + | CURLcode result = TEST_ERR_FAILURE; |
| struct t654_WriteThis pooh; | |
| /* | |
| @@ -117,7 +117,7 @@ static CURLcode test_lib654(const char *URL) | |
| curl2 = curl_easy_duphandle(curl); | |
| if(!curl2) { | |
| curl_mfprintf(stderr, "curl_easy_duphandle() failed\n"); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| @@ -127,16 +127,16 @@ static CURLcode test_lib654(const char *URL) | |
| mime = NULL; /* Already cleaned up. */ | |
| /* Perform on the first handle: should not send any data. */ | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_OK) { |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_OK) { |
| curl_mfprintf(stderr, "curl_easy_perform(original) failed\n"); | |
| goto test_cleanup; | |
| } | |
| /* Perform on the second handle: if the bound mime structure has not been | |
| duplicated properly, it should cause a valgrind error. */ | |
| - | res = curl_easy_perform(curl2); |
| - | if(res != CURLE_OK) { |
| + | result = curl_easy_perform(curl2); |
| + | if(result != CURLE_OK) { |
| curl_mfprintf(stderr, "curl_easy_perform(duplicated) failed\n"); | |
| goto test_cleanup; | |
| } | |
| @@ -150,7 +150,7 @@ static CURLcode test_lib654(const char *URL) | |
| if(pooh.freecount != 2) { | |
| curl_mfprintf(stderr, "free_callback() called %d times instead of 2\n", | |
| pooh.freecount); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| @@ -159,5 +159,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl2); | |
| curl_mime_free(mime); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -59,7 +59,7 @@ static int resolver_alloc_cb_pass(void *resolver_state, void *reserved, | |
| static CURLcode test_lib655(const char *URL) | |
| { | |
| CURL *curl; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| curl_mfprintf(stderr, "curl_global_init() failed\n"); | |
| @@ -68,7 +68,7 @@ static CURLcode test_lib655(const char *URL) | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -79,13 +79,13 @@ static CURLcode test_lib655(const char *URL) | |
| test_setopt(curl, CURLOPT_RESOLVER_START_FUNCTION, resolver_alloc_cb_fail); | |
| /* this should fail */ | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_ABORTED_BY_CALLBACK) { |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_ABORTED_BY_CALLBACK) { |
| curl_mfprintf(stderr, "curl_easy_perform should have returned " | |
| "CURLE_ABORTED_BY_CALLBACK but instead returned error %d\n", | |
| - | res); |
| - | if(res == CURLE_OK) |
| - | res = TEST_ERR_FAILURE; |
| + | result); |
| + | if(result == CURLE_OK) |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| @@ -95,15 +95,15 @@ static CURLcode test_lib655(const char *URL) | |
| test_setopt(curl, CURLOPT_RESOLVER_START_FUNCTION, resolver_alloc_cb_pass); | |
| /* this should succeed */ | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_easy_perform failed.\n"); | |
| goto test_cleanup; | |
| } | |
| if(cb_count != 2) { | |
| curl_mfprintf(stderr, "Unexpected number of callbacks: %d\n", cb_count); | |
| - | res = TEST_ERR_FAILURE; |
| + | result = TEST_ERR_FAILURE; |
| goto test_cleanup; | |
| } | |
| @@ -112,5 +112,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -30,7 +30,7 @@ | |
| static CURLcode test_lib658(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLU *urlp = NULL; | |
| CURLUcode uc = CURLUE_OK; | |
| @@ -57,12 +57,12 @@ static CURLcode test_lib658(const char *URL) | |
| easy_setopt(curl, CURLOPT_CURLU, urlp); | |
| easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, "%s:%d curl_easy_perform() failed " | |
| "with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| @@ -72,5 +72,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -30,7 +30,7 @@ | |
| static CURLcode test_lib659(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLU *urlp = NULL; | |
| global_init(CURL_GLOBAL_ALL); | |
| @@ -55,12 +55,12 @@ static CURLcode test_lib659(const char *URL) | |
| easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| easy_setopt(curl, CURLOPT_PROXY, URL); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, "%s:%d curl_easy_perform() failed " | |
| "with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| @@ -70,5 +70,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib661(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl = NULL; | |
| char *newURL = NULL; | |
| struct curl_slist *slist = NULL; | |
| @@ -38,7 +38,7 @@ static CURLcode test_lib661(const char *URL) | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -49,15 +49,15 @@ static CURLcode test_lib661(const char *URL) | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| test_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, 1L); | |
| test_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_SINGLECWD); | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_REMOTE_FILE_NOT_FOUND) |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_REMOTE_FILE_NOT_FOUND) |
| goto test_cleanup; | |
| curl_free(newURL); | |
| newURL = curl_maprintf("%s/folderB/661", URL); | |
| test_setopt(curl, CURLOPT_URL, newURL); | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_REMOTE_FILE_NOT_FOUND) |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_REMOTE_FILE_NOT_FOUND) |
| goto test_cleanup; | |
| /* test: CURLFTPMETHOD_NOCWD with absolute path should | |
| @@ -66,7 +66,7 @@ static CURLcode test_lib661(const char *URL) | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -76,8 +76,8 @@ static CURLcode test_lib661(const char *URL) | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| test_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, 1L); | |
| test_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_NOCWD); | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_REMOTE_FILE_NOT_FOUND) |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_REMOTE_FILE_NOT_FOUND) |
| goto test_cleanup; | |
| /* curve ball: CWD /folderB before reusing connection with _NOCWD */ | |
| @@ -85,16 +85,16 @@ static CURLcode test_lib661(const char *URL) | |
| newURL = curl_maprintf("%s/folderB/661", URL); | |
| test_setopt(curl, CURLOPT_URL, newURL); | |
| test_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_SINGLECWD); | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_REMOTE_FILE_NOT_FOUND) |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_REMOTE_FILE_NOT_FOUND) |
| goto test_cleanup; | |
| curl_free(newURL); | |
| newURL = curl_maprintf("%s/folderA/661", URL); | |
| test_setopt(curl, CURLOPT_URL, newURL); | |
| test_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_NOCWD); | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_REMOTE_FILE_NOT_FOUND) |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_REMOTE_FILE_NOT_FOUND) |
| goto test_cleanup; | |
| /* test: CURLFTPMETHOD_NOCWD with home-relative path should | |
| @@ -103,14 +103,14 @@ static CURLcode test_lib661(const char *URL) | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| slist = curl_slist_append(NULL, "SYST"); | |
| if(!slist) { | |
| curl_mfprintf(stderr, "curl_slist_append() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -119,8 +119,8 @@ static CURLcode test_lib661(const char *URL) | |
| test_setopt(curl, CURLOPT_NOBODY, 1L); | |
| test_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_NOCWD); | |
| test_setopt(curl, CURLOPT_QUOTE, slist); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* test: CURLFTPMETHOD_SINGLECWD with home-relative path should | |
| @@ -129,7 +129,7 @@ static CURLcode test_lib661(const char *URL) | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -138,8 +138,8 @@ static CURLcode test_lib661(const char *URL) | |
| test_setopt(curl, CURLOPT_NOBODY, 1L); | |
| test_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_SINGLECWD); | |
| test_setopt(curl, CURLOPT_QUOTE, slist); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| /* test: CURLFTPMETHOD_NOCWD with home-relative path should | |
| @@ -151,16 +151,16 @@ static CURLcode test_lib661(const char *URL) | |
| test_setopt(curl, CURLOPT_NOBODY, 1L); | |
| test_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_NOCWD); | |
| test_setopt(curl, CURLOPT_QUOTE, slist); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| - | if(res) |
| - | curl_mfprintf(stderr, "test encountered error %d\n", res); |
| + | if(result) |
| + | curl_mfprintf(stderr, "test encountered error %d\n", result); |
| curl_slist_free_all(slist); | |
| curl_free(newURL); | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -28,7 +28,7 @@ static CURLcode test_lib666(const char *URL) | |
| static char testbuf[17000]; /* more than 16K */ | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| curl_mime *mime = NULL; | |
| curl_mimepart *part; | |
| size_t i; | |
| @@ -50,7 +50,7 @@ static CURLcode test_lib666(const char *URL) | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -58,32 +58,32 @@ static CURLcode test_lib666(const char *URL) | |
| mime = curl_mime_init(curl); | |
| if(!mime) { | |
| curl_mfprintf(stderr, "curl_mime_init() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| part = curl_mime_addpart(mime); | |
| if(!part) { | |
| curl_mfprintf(stderr, "curl_mime_addpart() failed\n"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| - | res = curl_mime_name(part, "upfile"); |
| - | if(res) { |
| + | result = curl_mime_name(part, "upfile"); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_mime_name() failed\n"); | |
| goto test_cleanup; | |
| } | |
| - | res = curl_mime_filename(part, "myfile.txt"); |
| - | if(res) { |
| + | result = curl_mime_filename(part, "myfile.txt"); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_mime_filename() failed\n"); | |
| goto test_cleanup; | |
| } | |
| - | res = curl_mime_data(part, testbuf, sizeof(testbuf)); |
| - | if(res) { |
| + | result = curl_mime_data(part, testbuf, sizeof(testbuf)); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_mime_data() failed\n"); | |
| goto test_cleanup; | |
| } | |
| - | res = curl_mime_encoder(part, "binary"); |
| - | if(res) { |
| + | result = curl_mime_encoder(part, "binary"); |
| + | if(result) { |
| curl_mfprintf(stderr, "curl_mime_encoder() failed\n"); | |
| goto test_cleanup; | |
| } | |
| @@ -103,8 +103,8 @@ static CURLcode test_lib666(const char *URL) | |
| /* include headers in the output */ | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| - | /* Perform the request, res will get the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result will get the return code */ |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| @@ -116,5 +116,5 @@ test_cleanup: | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -56,7 +56,7 @@ static CURLcode test_lib667(const char *URL) | |
| CURL *curl = NULL; | |
| curl_mime *mime = NULL; | |
| curl_mimepart *part; | |
| - | CURLcode res = TEST_ERR_FAILURE; |
| + | CURLcode result = TEST_ERR_FAILURE; |
| struct t667_WriteThis pooh; | |
| /* | |
| @@ -96,8 +96,8 @@ static CURLcode test_lib667(const char *URL) | |
| test_setopt(curl, CURLOPT_MIMEPOST, mime); | |
| /* Send data. */ | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_OK) { |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_OK) { |
| curl_mfprintf(stderr, "curl_easy_perform() failed\n"); | |
| } | |
| @@ -105,5 +105,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_mime_free(mime); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -51,7 +51,7 @@ static CURLcode test_lib668(const char *URL) | |
| CURL *curl = NULL; | |
| curl_mime *mime = NULL; | |
| curl_mimepart *part; | |
| - | CURLcode res = TEST_ERR_FAILURE; |
| + | CURLcode result = TEST_ERR_FAILURE; |
| struct t668_WriteThis pooh1, pooh2; | |
| /* | |
| @@ -102,8 +102,8 @@ static CURLcode test_lib668(const char *URL) | |
| test_setopt(curl, CURLOPT_MIMEPOST, mime); | |
| /* Send data. */ | |
| - | res = curl_easy_perform(curl); |
| - | if(res != CURLE_OK) { |
| + | result = curl_easy_perform(curl); |
| + | if(result != CURLE_OK) { |
| curl_mfprintf(stderr, "curl_easy_perform() failed\n"); | |
| } | |
| @@ -111,5 +111,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_mime_free(mime); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -86,12 +86,10 @@ static int t670_xferinfo(void *clientp, | |
| static CURLcode test_lib670(const char *URL) | |
| { | |
| static const char testname[] = "field"; | |
| - | |
| curl_mime *mime = NULL; | |
| struct curl_httppost *formpost = NULL; | |
| - | |
| struct t670_ReadThis pooh; | |
| - | CURLcode res = TEST_ERR_FAILURE; |
| + | CURLcode result = TEST_ERR_FAILURE; |
| /* | |
| * Check proper pausing/unpausing from a mime or form read callback. | |
| @@ -120,19 +118,19 @@ static CURLcode test_lib670(const char *URL) | |
| /* Build the mime tree. */ | |
| mime = curl_mime_init(pooh.curl); | |
| part = curl_mime_addpart(mime); | |
| - | res = curl_mime_name(part, testname); |
| - | if(res != CURLE_OK) { |
| + | result = curl_mime_name(part, testname); |
| + | if(result != CURLE_OK) { |
| curl_mfprintf(stderr, | |
| - | "Something went wrong when building the mime structure: %d\n", |
| - | res); |
| + | "Something went wrong when building the " |
| + | "mime structure: %d\n", result); |
| goto test_cleanup; | |
| } | |
| - | res = curl_mime_data_cb(part, (curl_off_t)2, t670_read_cb, |
| - | NULL, NULL, &pooh); |
| + | result = curl_mime_data_cb(part, (curl_off_t)2, t670_read_cb, |
| + | NULL, NULL, &pooh); |
| /* Bind mime data to its easy handle. */ | |
| - | if(res == CURLE_OK) |
| + | if(result == CURLE_OK) |
| test_setopt(pooh.curl, CURLOPT_MIMEPOST, mime); | |
| } | |
| else { | |
| @@ -157,12 +155,12 @@ static CURLcode test_lib670(const char *URL) | |
| } | |
| if(testnum == 670 || testnum == 672) { | |
| - | CURLMcode mres; |
| + | CURLMcode mresult; |
| CURLM *multi; | |
| /* Use the multi interface. */ | |
| multi = curl_multi_init(); | |
| - | mres = curl_multi_add_handle(multi, pooh.curl); |
| - | while(!mres) { |
| + | mresult = curl_multi_add_handle(multi, pooh.curl); |
| + | while(!mresult) { |
| struct timeval timeout; | |
| int rc = 0; | |
| fd_set fdread; | |
| @@ -171,8 +169,8 @@ static CURLcode test_lib670(const char *URL) | |
| int maxfd = -1; | |
| int still_running = 0; | |
| - | mres = curl_multi_perform(multi, &still_running); |
| - | if(!still_running || mres != CURLM_OK) |
| + | mresult = curl_multi_perform(multi, &still_running); |
| + | if(!still_running || mresult != CURLM_OK) |
| break; | |
| if(pooh.origin) { | |
| @@ -180,7 +178,7 @@ static CURLcode test_lib670(const char *URL) | |
| if(delta >= 4 * PAUSE_TIME) { | |
| curl_mfprintf(stderr, "unpausing failed: drain problem?\n"); | |
| - | res = CURLE_OPERATION_TIMEDOUT; |
| + | result = CURLE_OPERATION_TIMEDOUT; |
| break; | |
| } | |
| @@ -193,8 +191,8 @@ static CURLcode test_lib670(const char *URL) | |
| FD_ZERO(&fdexcept); | |
| timeout.tv_sec = 0; | |
| timeout.tv_usec = 1000000 * PAUSE_TIME / 10; | |
| - | mres = curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcept, &maxfd); |
| - | if(mres) |
| + | mresult = curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcept, &maxfd); |
| + | if(mresult) |
| break; | |
| #ifdef _WIN32 | |
| if(maxfd == -1) | |
| @@ -208,7 +206,7 @@ static CURLcode test_lib670(const char *URL) | |
| } | |
| } | |
| - | if(mres != CURLM_OK) |
| + | if(mresult != CURLM_OK) |
| for(;;) { | |
| int msgs_left; | |
| CURLMsg *msg; | |
| @@ -216,7 +214,7 @@ static CURLcode test_lib670(const char *URL) | |
| if(!msg) | |
| break; | |
| if(msg->msg == CURLMSG_DONE) { | |
| - | res = msg->data.result; |
| + | result = msg->data.result; |
| } | |
| } | |
| @@ -228,7 +226,7 @@ static CURLcode test_lib670(const char *URL) | |
| test_setopt(pooh.curl, CURLOPT_XFERINFODATA, &pooh); | |
| test_setopt(pooh.curl, CURLOPT_XFERINFOFUNCTION, t670_xferinfo); | |
| test_setopt(pooh.curl, CURLOPT_NOPROGRESS, 0L); | |
| - | res = curl_easy_perform(pooh.curl); |
| + | result = curl_easy_perform(pooh.curl); |
| } | |
| test_cleanup: | |
| @@ -242,5 +240,5 @@ test_cleanup: | |
| } | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -31,7 +31,7 @@ static CURLcode test_lib674(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| CURL *curl2; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURLU *urlp = NULL; | |
| CURLUcode uc = CURLUE_OK; | |
| @@ -57,17 +57,17 @@ static CURLcode test_lib674(const char *URL) | |
| easy_setopt(curl, CURLOPT_CURLU, urlp); | |
| easy_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| - | if(res) { |
| + | if(result) { |
| curl_mfprintf(stderr, "%s:%d curl_easy_perform() failed " | |
| "with code %d (%s)\n", | |
| - | __FILE__, __LINE__, res, curl_easy_strerror(res)); |
| + | __FILE__, __LINE__, result, curl_easy_strerror(result)); |
| goto test_cleanup; | |
| } | |
| curl2 = curl_easy_duphandle(curl); | |
| - | res = curl_easy_perform(curl2); |
| + | result = curl_easy_perform(curl2); |
| curl_easy_cleanup(curl2); | |
| test_cleanup: | |
| @@ -76,5 +76,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib676(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { | |
| @@ -46,8 +46,8 @@ static CURLcode test_lib676(const char *URL) | |
| test_setopt(curl, CURLOPT_COOKIEFILE, libtest_arg2); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) { |
| + | result = curl_easy_perform(curl); |
| + | if(result) { |
| curl_mfprintf(stderr, "retrieve 1 failed\n"); | |
| goto test_cleanup; | |
| } | |
| @@ -55,8 +55,8 @@ static CURLcode test_lib676(const char *URL) | |
| /* now clear the cookies */ | |
| test_setopt(curl, CURLOPT_COOKIEFILE, NULL); | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| curl_mfprintf(stderr, "retrieve 2 failed\n"); | |
| test_cleanup: | |
| @@ -64,5 +64,5 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -27,7 +27,6 @@ static CURLcode test_lib677(const char *URL) | |
| { | |
| static const char testcmd[] = "A1 IDLE\r\n"; | |
| static char testbuf[1024]; | |
| - | |
| CURLM *mcurl; | |
| CURL *curl = NULL; | |
| int mrun; | |
| @@ -35,7 +34,7 @@ static CURLcode test_lib677(const char *URL) | |
| time_t start = time(NULL); | |
| int state = 0; | |
| ssize_t pos = 0; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_DEFAULT); | |
| multi_init(mcurl); | |
| @@ -86,7 +85,7 @@ static CURLcode test_lib677(const char *URL) | |
| else if(ec) { | |
| curl_mfprintf(stderr, "curl_easy_send() failed, with code %d (%s)\n", | |
| ec, curl_easy_strerror(ec)); | |
| - | res = ec; |
| + | result = ec; |
| goto test_cleanup; | |
| } | |
| if(len > 0) | |
| @@ -107,7 +106,7 @@ static CURLcode test_lib677(const char *URL) | |
| else if(ec) { | |
| curl_mfprintf(stderr, "curl_easy_recv() failed, with code %d (%s)\n", | |
| ec, curl_easy_strerror(ec)); | |
| - | res = ec; |
| + | result = ec; |
| goto test_cleanup; | |
| } | |
| if(len > 0) | |
| @@ -129,5 +128,5 @@ test_cleanup: | |
| curl_multi_cleanup(mcurl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -93,7 +93,7 @@ static CURLcode test_cert_blob(const char *url, const char *cafile) | |
| static CURLcode test_lib678(const char *URL) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| curl_global_init(CURL_GLOBAL_DEFAULT); | |
| if(!strcmp("check", URL)) { | |
| CURLcode w = CURLE_OK; | |
| @@ -105,11 +105,11 @@ static CURLcode test_lib678(const char *URL) | |
| curl_mprintf("CURLOPT_CAINFO_BLOB is not supported\n"); | |
| curl_easy_cleanup(curl); | |
| } | |
| - | res = w; |
| + | result = w; |
| } | |
| else | |
| - | res = test_cert_blob(URL, libtest_arg2); |
| + | result = test_cert_blob(URL, libtest_arg2); |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -25,7 +25,7 @@ | |
| static CURLcode test_lib694(const char *URL) | |
| { | |
| - | CURLcode res; |
| + | CURLcode result; |
| CURL *curl; | |
| long usedauth = 0; | |
| int count = 0; | |
| @@ -51,12 +51,12 @@ static CURLcode test_lib694(const char *URL) | |
| do { | |
| - | res = curl_easy_perform(curl); |
| - | if(res) |
| + | result = curl_easy_perform(curl); |
| + | if(result) |
| goto test_cleanup; | |
| - | res = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_USED, &usedauth); |
| - | if(res) |
| + | result = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_USED, &usedauth); |
| + | if(result) |
| goto test_cleanup; | |
| if(CURLAUTH_NTLM != usedauth) { | |
| curl_mprintf("CURLINFO_HTTPAUTH_USED did not say NTLM\n"); | |
| @@ -64,12 +64,12 @@ static CURLcode test_lib694(const char *URL) | |
| /* set a new URL for the second, so that we do not restart NTLM */ | |
| test_setopt(curl, CURLOPT_URL, libtest_arg2); | |
| - | } while(!res && ++count < 2); |
| + | } while(!result && ++count < 2); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -37,7 +37,7 @@ static CURLcode test_lib695(const char *URL) | |
| curl_mime *mime1 = NULL; | |
| curl_mime *mime2 = NULL; | |
| curl_mimepart *part; | |
| - | CURLcode res = TEST_ERR_FAILURE; |
| + | CURLcode result = TEST_ERR_FAILURE; |
| /* | |
| * Check proper rewind when reusing a mime structure. | |
| @@ -69,13 +69,13 @@ static CURLcode test_lib695(const char *URL) | |
| /* Use first mime structure as top level MIME POST. */ | |
| curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime1); | |
| - | /* Perform the request, res gets the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result gets the return code */ |
| + | result = curl_easy_perform(curl); |
| /* Check for errors */ | |
| - | if(res != CURLE_OK) |
| + | if(result != CURLE_OK) |
| curl_mfprintf(stderr, "curl_easy_perform() 1 failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| else { | |
| /* phase two, create a mime struct using the mime1 handle */ | |
| mime2 = curl_mime_init(curl); | |
| @@ -85,21 +85,21 @@ static CURLcode test_lib695(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime2); | |
| /* Reuse previous mime structure as a child. */ | |
| - | res = curl_mime_subparts(part, mime1); |
| + | result = curl_mime_subparts(part, mime1); |
| - | if(res != CURLE_OK) |
| + | if(result != CURLE_OK) |
| curl_mfprintf(stderr, "curl_mime_subparts() failed: %sn", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| else { | |
| mime1 = NULL; | |
| - | /* Perform the request, res gets the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result gets the return code */ |
| + | result = curl_easy_perform(curl); |
| /* Check for errors */ | |
| - | if(res != CURLE_OK) |
| + | if(result != CURLE_OK) |
| curl_mfprintf(stderr, "curl_easy_perform() 2 failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| } | |
| } | |
| @@ -108,5 +108,5 @@ test_cleanup: | |
| curl_mime_free(mime1); | |
| curl_mime_free(mime2); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -31,8 +31,8 @@ static CURLcode test_lib751(const char *URL) | |
| { | |
| CURL *curls[1000]; | |
| CURLM *multi; | |
| - | CURLcode res = CURLE_FAILED_INIT; |
| - | CURLMcode mres; |
| + | CURLcode result = CURLE_FAILED_INIT; |
| + | CURLMcode mresult; |
| int i; | |
| (void)URL; | |
| @@ -41,36 +41,36 @@ static CURLcode test_lib751(const char *URL) | |
| curl_global_init(CURL_GLOBAL_DEFAULT); | |
| multi = curl_multi_init(); | |
| if(!multi) { | |
| - | res = CURLE_OUT_OF_MEMORY; |
| + | result = CURLE_OUT_OF_MEMORY; |
| goto test_cleanup; | |
| } | |
| for(i = 0; i < 1000; i++) { | |
| CURL *curl = curl_easy_init(); | |
| if(!curl) { | |
| - | res = CURLE_OUT_OF_MEMORY; |
| + | result = CURLE_OUT_OF_MEMORY; |
| goto test_cleanup; | |
| } | |
| curls[i] = curl; | |
| - | res = curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/"); |
| - | if(!res) |
| - | res = curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); |
| - | if(res) |
| + | result = curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/"); |
| + | if(!result) |
| + | result = curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); |
| + | if(result) |
| goto test_cleanup; | |
| - | mres = curl_multi_add_handle(multi, curl); |
| - | if(mres != CURLM_OK) { |
| - | curl_mfprintf(stderr, "MULTI ERROR: %s\n", curl_multi_strerror(mres)); |
| - | res = CURLE_FAILED_INIT; |
| + | mresult = curl_multi_add_handle(multi, curl); |
| + | if(mresult != CURLM_OK) { |
| + | curl_mfprintf(stderr, "MULTI ERROR: %s\n", curl_multi_strerror(mresult)); |
| + | result = CURLE_FAILED_INIT; |
| goto test_cleanup; | |
| } | |
| } | |
| test_cleanup: | |
| - | if(res) |
| - | curl_mfprintf(stderr, "ERROR: %s\n", curl_easy_strerror(res)); |
| + | if(result) |
| + | curl_mfprintf(stderr, "ERROR: %s\n", curl_easy_strerror(result)); |
| for(i = 0; i < 1000; i++) { | |
| if(curls[i]) { | |
| @@ -82,5 +82,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -65,7 +65,7 @@ static bool t753_setup(const char *URL, const char *name, | |
| struct t753_transfer_status *st) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| *pcurl = NULL; | |
| memset(st, 0, sizeof(*st)); | |
| @@ -100,8 +100,8 @@ static CURLcode test_lib753(const char *URL) | |
| CURL *curl1 = NULL, *curl2 = NULL; | |
| CURLM *multi = NULL; | |
| struct t753_transfer_status st1, st2; | |
| - | CURLcode res = CURLE_OK; |
| - | CURLMcode mres; |
| + | CURLcode result = CURLE_OK; |
| + | CURLMcode mresult; |
| int still_running; | |
| start_test_timing(); | |
| @@ -114,7 +114,7 @@ static CURLcode test_lib753(const char *URL) | |
| curl_mfprintf(stderr, "init multi\n"); | |
| multi = curl_multi_init(); | |
| if(!multi) { | |
| - | res = CURLE_OUT_OF_MEMORY; |
| + | result = CURLE_OUT_OF_MEMORY; |
| goto test_cleanup; | |
| } | |
| @@ -152,10 +152,10 @@ static CURLcode test_lib753(const char *URL) | |
| } | |
| } | |
| - | mres = curl_multi_wait(multi, NULL, 0, 1, &num); |
| - | if(mres != CURLM_OK) { |
| - | curl_mfprintf(stderr, "curl_multi_wait() returned %d\n", mres); |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | mresult = curl_multi_wait(multi, NULL, 0, 1, &num); |
| + | if(mresult != CURLM_OK) { |
| + | curl_mfprintf(stderr, "curl_multi_wait() returned %d\n", mresult); |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -169,8 +169,8 @@ static CURLcode test_lib753(const char *URL) | |
| test_cleanup: | |
| - | if(res) |
| - | curl_mfprintf(stderr, "ERROR: %s\n", curl_easy_strerror(res)); |
| + | if(result) |
| + | curl_mfprintf(stderr, "ERROR: %s\n", curl_easy_strerror(result)); |
| if(curl1) | |
| curl_easy_cleanup(curl1); | |
| @@ -179,5 +179,5 @@ test_cleanup: | |
| curl_multi_cleanup(multi); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -58,7 +58,7 @@ static CURLcode test_lib757(const char *URL) | |
| curl_mime *mime1 = NULL; | |
| curl_mime *mime2 = NULL; | |
| curl_mimepart *part; | |
| - | CURLcode res = TEST_ERR_FAILURE; |
| + | CURLcode result = TEST_ERR_FAILURE; |
| /* | |
| * Check proper rewind when reusing a mime structure. | |
| @@ -90,13 +90,13 @@ static CURLcode test_lib757(const char *URL) | |
| /* Use first mime structure as top level MIME POST. */ | |
| curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime1); | |
| - | /* Perform the request, res gets the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result gets the return code */ |
| + | result = curl_easy_perform(curl); |
| /* Check for errors */ | |
| - | if(res != CURLE_OK) |
| + | if(result != CURLE_OK) |
| curl_mfprintf(stderr, "curl_easy_perform() 1 failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| else { | |
| /* phase two, create a mime struct using the mime1 handle */ | |
| mime2 = curl_mime_init(curl); | |
| @@ -106,21 +106,21 @@ static CURLcode test_lib757(const char *URL) | |
| curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime2); | |
| /* Reuse previous mime structure as a child. */ | |
| - | res = curl_mime_subparts(part, mime1); |
| + | result = curl_mime_subparts(part, mime1); |
| - | if(res != CURLE_OK) |
| + | if(result != CURLE_OK) |
| curl_mfprintf(stderr, "curl_mime_subparts() failed: %sn", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| else { | |
| mime1 = NULL; | |
| - | /* Perform the request, res gets the return code */ |
| - | res = curl_easy_perform(curl); |
| + | /* Perform the request, result gets the return code */ |
| + | result = curl_easy_perform(curl); |
| /* Check for errors */ | |
| - | if(res != CURLE_OK) |
| + | if(result != CURLE_OK) |
| curl_mfprintf(stderr, "curl_easy_perform() 2 failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(result)); |
| } | |
| } | |
| @@ -129,5 +129,5 @@ test_cleanup: | |
| curl_mime_free(mime1); | |
| curl_mime_free(mime2); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -298,13 +298,13 @@ static CURLMcode t758_saction(CURLM *multi, curl_socket_t s, | |
| int evBitmask, const char *info) | |
| { | |
| int numhandles = 0; | |
| - | CURLMcode result = curl_multi_socket_action(multi, s, evBitmask, |
| - | &numhandles); |
| - | if(result != CURLM_OK) { |
| + | CURLMcode mresult = curl_multi_socket_action(multi, s, evBitmask, |
| + | &numhandles); |
| + | if(mresult != CURLM_OK) { |
| curl_mfprintf(stderr, "%s curl error on %s (%i) %s\n", | |
| - | t758_tag(), info, result, curl_multi_strerror(result)); |
| + | t758_tag(), info, mresult, curl_multi_strerror(mresult)); |
| } | |
| - | return result; |
| + | return mresult; |
| } | |
| /** | |
| @@ -329,7 +329,7 @@ static CURLMcode t758_checkFdSet(CURLM *multi, struct t758_Sockets *sockets, | |
| static CURLcode t758_one(const char *URL, int timer_fail_at, | |
| int socket_fail_at) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| struct t758_ReadWriteSockets sockets = { { NULL, 0, 0 }, { NULL, 0, 0 } }; | |
| @@ -347,13 +347,13 @@ static CURLcode t758_one(const char *URL, int timer_fail_at, | |
| if(curl_global_sslset(CURLSSLBACKEND_OPENSSL, NULL, NULL) != CURLSSLSET_OK) { | |
| t758_msg("could not set OpenSSL as backend"); | |
| - | res = CURLE_FAILED_INIT; |
| - | return res; |
| + | result = CURLE_FAILED_INIT; |
| + | return result; |
| } | |
| res_global_init(CURL_GLOBAL_ALL); | |
| - | if(res != CURLE_OK) |
| - | return res; |
| + | if(result != CURLE_OK) |
| + | return result; |
| curl_global_trace("all"); | |
| @@ -383,7 +383,7 @@ static CURLcode t758_one(const char *URL, int timer_fail_at, | |
| multi_add_handle(multi, curl); | |
| if(t758_saction(multi, CURL_SOCKET_TIMEOUT, 0, "timeout")) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| while(!t758_checkForCompletion(multi, &success)) { | |
| @@ -396,29 +396,29 @@ static CURLcode t758_one(const char *URL, int timer_fail_at, | |
| !t758_ctx.fake_async_cert_verification_finished) { | |
| if(sockets.read.count || sockets.write.count) { | |
| t758_msg("during verification there should be no sockets scheduled"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| if(t758_ctx.number_of_cert_verify_callbacks != 1) { | |
| t758_msg("expecting exactly one cert verify callback here"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| t758_ctx.fake_async_cert_verification_finished = 1; | |
| if(t758_saction(multi, CURL_SOCKET_TIMEOUT, 0, "timeout")) { | |
| t758_msg("spurious retry cert action"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| curl_easy_pause(curl, CURLPAUSE_CONT); | |
| if(t758_saction(multi, CURL_SOCKET_TIMEOUT, 0, "timeout")) { | |
| t758_msg("unblocking transfer after cert verification finished"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| if(t758_ctx.number_of_cert_verify_callbacks != 2) { | |
| t758_msg("this should have triggered the callback again, right?"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| t758_msg("TEST: all fine?"); | |
| @@ -443,12 +443,12 @@ static CURLcode t758_one(const char *URL, int timer_fail_at, | |
| /* Check the sockets for reading / writing */ | |
| if(t758_checkFdSet(multi, &sockets.read, &readSet, CURL_CSELECT_IN, | |
| "read")) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| if(t758_checkFdSet(multi, &sockets.write, &writeSet, CURL_CSELECT_OUT, | |
| "write")) { | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| @@ -456,7 +456,7 @@ static CURLcode t758_one(const char *URL, int timer_fail_at, | |
| t758_getMicroSecondTimeout(&timeout) == 0) { | |
| /* curl's timer has elapsed. */ | |
| if(t758_saction(multi, CURL_SOCKET_TIMEOUT, 0, "timeout")) { | |
| - | res = TEST_ERR_BAD_TIMEOUT; |
| + | result = TEST_ERR_BAD_TIMEOUT; |
| goto test_cleanup; | |
| } | |
| } | |
| @@ -465,13 +465,13 @@ static CURLcode t758_one(const char *URL, int timer_fail_at, | |
| } | |
| if(success && t758_ctx.number_of_cert_verify_callbacks != 2) { | |
| t758_msg("unexpected invocations of cert verify callback"); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| goto test_cleanup; | |
| } | |
| if(!success) { | |
| t758_msg("Error getting file."); | |
| - | res = TEST_ERR_MAJOR_BAD; |
| + | result = TEST_ERR_MAJOR_BAD; |
| } | |
| test_cleanup: | |
| @@ -488,7 +488,7 @@ test_cleanup: | |
| curlx_free(sockets.write.sockets); | |
| t758_msg("done"); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode test_lib758(const char *URL) | |
| @@ -41,7 +41,7 @@ static int sockopt_766(void *clientp, | |
| static CURLcode test_lib766(const char *URL) | |
| { | |
| CURL *curl = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| start_test_timing(); | |
| @@ -53,12 +53,12 @@ static CURLcode test_lib766(const char *URL) | |
| easy_setopt(curl, CURLOPT_FTPPORT, "-"); | |
| easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_766); | |
| - | res = curl_easy_perform(curl); |
| + | result = curl_easy_perform(curl); |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| - | return res; |
| + | return result; |
| } | |
| @@ -372,14 +372,14 @@ static CURLcode test_lib1521(const char *URL) | |
| struct curl_certinfo *certinfo; | |
| struct curl_tlssessioninfo *tlssession; | |
| struct curl_blob blob = { CURL_UNCONST("silly"), 5, 0}; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| (void)URL; | |
| global_init(CURL_GLOBAL_ALL); | |
| easy_init(dep); | |
| easy_init(curl); | |
| share = curl_share_init(); | |
| if(!share) { | |
| - | res = CURLE_OUT_OF_MEMORY; |
| + | result = CURLE_OUT_OF_MEMORY; |
| goto test_cleanup; | |
| } | |
| @@ -447,7 +447,8 @@ while(<STDIN>) { | |
| # the first check for an option | |
| my $fpref = "${exists}${w2}CURLcode first =\n${w3}curl_easy_setopt(curl, $name,"; | |
| my $ifpresent = "${w2}if(present(first)) {\n"; | |
| - | my $pref = "${w3}res = curl_easy_setopt(curl, $name,"; |
| + | my $pref = "${w3}result =\n". |
| + | "${w3} curl_easy_setopt(curl, $name,"; |
| my $i = ' ' x (length($w) + 25); | |
| my $fcheck = <<MOO | |
| if(first && present(first)) /* first setopt check only */ | |
| @@ -460,8 +461,8 @@ MOO | |
| MOO | |
| ; | |
| my $check = <<MOO | |
| - | if(res) |
| - | err("$name", res, __LINE__); |
| + | if(result) |
| + | err("$name", result, __LINE__); |
| MOO | |
| ; | |
| my $flongcheckzero = <<MOO | |
| @@ -472,20 +473,20 @@ MOO | |
| ; | |
| my $longcheck = <<MOO | |
| - | if(res && !bad_long(res, $name)) |
| - | errlong("$name", res, __LINE__); |
| + | if(result && !bad_long(result, $name)) |
| + | errlong("$name", result, __LINE__); |
| MOO | |
| ; | |
| my $negcheck = <<MOO | |
| - | if(res && bad_neg($name)) |
| - | errneg("$name", res, __LINE__); |
| + | if(result && bad_neg($name)) |
| + | errneg("$name", result, __LINE__); |
| MOO | |
| ; | |
| my $nullcheck = <<MOO | |
| - | if(res) |
| - | errnull(\"$name\", res, __LINE__); |
| + | if(result) |
| + | errnull(\"$name\", result, __LINE__); |
| MOO | |
| ; | |
| @@ -586,8 +587,8 @@ MOO | |
| elsif($infomode && | |
| ($_ =~ /^CURLINFO_([^ ]*) *= *CURLINFO_([^ ]*)/)) { | |
| my ($info, $type)=($1, $2); | |
| - | my $c = " res = curl_easy_getinfo(curl, CURLINFO_$info,"; |
| - | my $check = " if(res)\n t1521_geterr(\"$info\", res, __LINE__);\n"; |
| + | my $c = " result = curl_easy_getinfo(curl, CURLINFO_$info,"; |
| + | my $check = " if(result)\n t1521_geterr(\"$info\", result, __LINE__);\n"; |
| if($type eq "STRING") { | |
| print $fh "$c &charp);\n$check"; | |
| } | |
| @@ -629,16 +630,16 @@ print $fh <<FOOTER | |
| /* NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange) */ | |
| curl_easy_setopt(curl, (CURLoption)1, 0L); | |
| - | res = CURLE_OK; |
| + | result = CURLE_OK; |
| test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_easy_cleanup(dep); | |
| curl_share_cleanup(share); | |
| curl_global_cleanup(); | |
| - | if(!res) |
| + | if(!result) |
| puts("ok"); | |
| - | return res; |
| + | return result; |
| } | |
| FOOTER | |
| ; | |
| @@ -28,7 +28,7 @@ | |
| static CURLcode t1303_setup(struct Curl_easy **easy) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| *easy = curl_easy_init(); | |
| @@ -36,7 +36,7 @@ static CURLcode t1303_setup(struct Curl_easy **easy) | |
| curl_global_cleanup(); | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| - | return res; |
| + | return result; |
| } | |
| static void t1303_stop(struct Curl_easy *easy) | |
| @@ -25,9 +25,9 @@ | |
| static CURLcode t1396_setup(void) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| - | return res; |
| + | return result; |
| } | |
| static void t1396_stop(CURL *easy) | |
| @@ -28,7 +28,7 @@ | |
| static CURLcode t1600_setup(CURL **easy) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| *easy = curl_easy_init(); | |
| @@ -36,7 +36,7 @@ static CURLcode t1600_setup(CURL **easy) | |
| curl_global_cleanup(); | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| - | return res; |
| + | return result; |
| } | |
| static void t1600_stop(CURL *easy) | |
| @@ -27,7 +27,7 @@ | |
| static CURLcode t1605_setup(CURL **easy) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| *easy = curl_easy_init(); | |
| @@ -35,7 +35,7 @@ static CURLcode t1605_setup(CURL **easy) | |
| curl_global_cleanup(); | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| - | return res; |
| + | return result; |
| } | |
| static void t1605_stop(CURL *easy) | |
| @@ -28,7 +28,7 @@ | |
| static CURLcode t1606_setup(struct Curl_easy **easy) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| *easy = curl_easy_init(); | |
| @@ -36,7 +36,7 @@ static CURLcode t1606_setup(struct Curl_easy **easy) | |
| curl_global_cleanup(); | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| - | return res; |
| + | return result; |
| } | |
| static void t1606_stop(struct Curl_easy *easy) | |
| @@ -53,7 +53,7 @@ static int runawhile(struct Curl_easy *easy, | |
| { | |
| int counter = 1; | |
| struct curltime now = { 1, 0 }; | |
| - | CURLcode res; |
| + | CURLcode result; |
| int finaltime; | |
| curl_easy_setopt(easy, CURLOPT_LOW_SPEED_LIMIT, speed_limit); | |
| @@ -63,8 +63,8 @@ static int runawhile(struct Curl_easy *easy, | |
| do { | |
| /* fake the current transfer speed */ | |
| easy->progress.current_speed = speed; | |
| - | res = pgrs_speedcheck(easy, &now); |
| - | if(res) |
| + | result = pgrs_speedcheck(easy, &now); |
| + | if(result) |
| break; | |
| /* step the time */ | |
| now.tv_sec = ++counter; | |
| @@ -29,9 +29,9 @@ | |
| static CURLcode t1607_setup(void) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode test_unit1607(const char *arg) | |
| @@ -29,9 +29,9 @@ | |
| static CURLcode t1609_setup(void) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| - | return res; |
| + | return result; |
| } | |
| /* CURLOPT_RESOLVE address parsing test - to test the following defect fix: | |
| @@ -27,9 +27,9 @@ | |
| static CURLcode t1610_setup(void) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode test_unit1610(const char *arg) | |
| @@ -28,9 +28,9 @@ | |
| static CURLcode t1620_setup(void) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| - | return res; |
| + | return result; |
| } | |
| static void t1620_parse(const char *input, | |
| @@ -54,7 +54,7 @@ static int debugf_cb(CURL *handle, curl_infotype type, char *buf, size_t size, | |
| static CURLcode t1652_setup(struct Curl_easy **easy) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| *easy = curl_easy_init(); | |
| @@ -64,7 +64,7 @@ static CURLcode t1652_setup(struct Curl_easy **easy) | |
| } | |
| curl_easy_setopt(*easy, CURLOPT_DEBUGFUNCTION, debugf_cb); | |
| curl_easy_setopt(*easy, CURLOPT_VERBOSE, 1L); | |
| - | return res; |
| + | return result; |
| } | |
| static void t1652_stop(struct Curl_easy *easy) | |
| @@ -502,7 +502,7 @@ static CURLcode test_unit1658(const char *arg) | |
| } | |
| }; | |
| - | CURLcode res = CURLE_OUT_OF_MEMORY; |
| + | CURLcode result = CURLE_OUT_OF_MEMORY; |
| CURL *easy; | |
| easy = curl_easy_init(); | |
| @@ -516,10 +516,10 @@ static CURLcode test_unit1658(const char *arg) | |
| curl_mprintf("test %u: %s\n", i, t[i].name); | |
| - | res = doh_resp_decode_httpsrr(easy, t[i].dns, t[i].len, &hrr); |
| + | result = doh_resp_decode_httpsrr(easy, t[i].dns, t[i].len, &hrr); |
| /* create an output */ | |
| - | rrresults(hrr, res); |
| + | rrresults(hrr, result); |
| /* is the output the expected? */ | |
| if(strcmp(rrbuffer, t[i].expect)) { | |
| @@ -51,7 +51,7 @@ static CURLcode test_unit1661(const char *arg) | |
| UNITTEST_BEGIN(t1661_setup(&bufref)) | |
| const char *buffer = NULL; | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| /** | |
| * testing Curl_bufref_init. | |
| @@ -89,8 +89,8 @@ static CURLcode test_unit1661(const char *arg) | |
| /** | |
| * testing Curl_bufref_memdup0 | |
| */ | |
| - | res = Curl_bufref_memdup0(&bufref, "1661", 3); |
| - | abort_unless(res == CURLE_OK, curl_easy_strerror(res)); |
| + | result = Curl_bufref_memdup0(&bufref, "1661", 3); |
| + | abort_unless(result == CURLE_OK, curl_easy_strerror(result)); |
| fail_unless(freecount == 1, "Destructor not called"); | |
| fail_unless((const char *)bufref.ptr != buffer, "Returned pointer not set"); | |
| buffer = (const char *)Curl_bufref_ptr(&bufref); | |
| @@ -34,9 +34,9 @@ | |
| static CURLcode t1663_setup(void) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| - | return res; |
| + | return result; |
| } | |
| static void t1663_parse(const char *input_data, | |
| @@ -32,9 +32,9 @@ | |
| static CURLcode t1664_setup(void) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| - | return res; |
| + | return result; |
| } | |
| static CURLcode test_unit1664(const char *arg) | |
| @@ -50,7 +50,7 @@ | |
| static CURLcode t2600_setup(CURL **easy) | |
| { | |
| - | CURLcode res = CURLE_OK; |
| + | CURLcode result = CURLE_OK; |
| global_init(CURL_GLOBAL_ALL); | |
| *easy = curl_easy_init(); | |
| @@ -60,7 +60,7 @@ static CURLcode t2600_setup(CURL **easy) | |
| } | |
| curl_global_trace("all"); | |
| curl_easy_setopt(*easy, CURLOPT_VERBOSE, 1L); | |
| - | return res; |
| + | return result; |
| } | |
| static void t2600_stop(CURL *easy) | |
| @@ -95,7 +95,7 @@ struct ai_family_stats { | |
| }; | |
| struct test_result { | |
| - | CURLcode res; |
| + | CURLcode result; |
| struct curltime started; | |
| struct curltime ended; | |
| struct ai_family_stats cf4; | |
| @@ -188,13 +188,13 @@ static CURLcode cf_test_create(struct Curl_cfilter **pcf, | |
| struct cf_test_ctx *ctx = NULL; | |
| struct Curl_cfilter *cf = NULL; | |
| timediff_t created_at; | |
| - | CURLcode res; |
| + | CURLcode result; |
| (void)data; | |
| (void)conn; | |
| ctx = curlx_calloc(1, sizeof(*ctx)); | |
| if(!ctx) { | |
| - | res = CURLE_OUT_OF_MEMORY; |
| + | result = CURLE_OUT_OF_MEMORY; |
| goto out; | |
| } | |
| ctx->idx = test_idx++; | |
| @@ -223,19 +223,19 @@ static CURLcode cf_test_create(struct Curl_cfilter **pcf, | |
| ctx->stats->last_created = created_at; | |
| infof(data, "%04dms: cf[%s] created", (int)created_at, ctx->id); | |
| - | res = Curl_cf_create(&cf, &cft_test, ctx); |
| - | if(res) |
| + | result = Curl_cf_create(&cf, &cft_test, ctx); |
| + | if(result) |
| goto out; | |
| Curl_expire(data, ctx->fail_delay_ms, EXPIRE_TIMEOUT); | |
| out: | |
| - | *pcf = (!res) ? cf : NULL; |
| - | if(res) { |
| + | *pcf = (!result) ? cf : NULL; |
| + | if(result) { |
| curlx_free(cf); | |
| curlx_free(ctx); | |
| } | |
| - | return res; |
| + | return result; |
| } | |
| static void check_result(const struct test_case *tc, struct test_result *tr) | |
| @@ -246,11 +246,11 @@ static void check_result(const struct test_case *tc, struct test_result *tr) | |
| duration_ms = curlx_timediff_ms(tr->ended, tr->started); | |
| curl_mfprintf(stderr, "%d: test case took %dms\n", tc->id, (int)duration_ms); | |
| - | if(tr->res != tc->exp_res && CURLE_OPERATION_TIMEDOUT != tr->res) { |
| + | if(tr->result != tc->exp_res && CURLE_OPERATION_TIMEDOUT != tr->result) { |
| /* on CI we encounter the TIMEOUT result, since images get less CPU | |
| * and events are not as sharply timed. */ | |
| curl_msprintf(msg, "%d: expected result %d but got %d", | |
| - | tc->id, tc->exp_res, tr->res); |
| + | tc->id, tc->exp_res, tr->result); |
| fail(msg); | |
| } | |
| if(tr->cf4.creations != tc->exp_cf4_creations) { | |
| @@ -323,7 +323,7 @@ static void test_connect(CURL *easy, const struct test_case *tc) | |
| tr.cf4.family = "v4"; | |
| tr.started = curlx_now(); | |
| - | tr.res = curl_easy_perform(easy); |
| + | tr.result = curl_easy_perform(easy); |
| tr.ended = curlx_now(); | |
| curl_easy_setopt(easy, CURLOPT_RESOLVE, NULL); | |
| @@ -35,7 +35,7 @@ static CURLcode test_unit2604(const char *arg) | |
| const char *expect; /* the returned content */ | |
| const char *next; /* what cp points to after the call */ | |
| const char *home; | |
| - | CURLcode res; |
| + | CURLcode result; |
| }; | |
| #if defined(CURL_GNUC_DIAG) || defined(__clang__) | |
| @@ -85,14 +85,14 @@ static CURLcode test_unit2604(const char *arg) | |
| for(i = 0; list[i].home; i++) { | |
| char *path; | |
| const char *cp = i == 0 ? cp0 : list[i].cp; | |
| - | CURLcode res = Curl_get_pathname(&cp, &path, list[i].home); |
| + | CURLcode result = Curl_get_pathname(&cp, &path, list[i].home); |
| curl_mprintf("%u - Curl_get_pathname(\"%s\", ... \"%s\") == %u\n", i, | |
| - | list[i].cp, list[i].home, list[i].res); |
| - | if(res != list[i].res) { |
| - | curl_mprintf("... returned %d\n", res); |
| + | list[i].cp, list[i].home, list[i].result); |
| + | if(result != list[i].result) { |
| + | curl_mprintf("... returned %d\n", result); |
| unitfail++; | |
| } | |
| - | if(!res) { |
| + | if(!result) { |
| if(cp && strcmp(cp, list[i].next)) { | |
| curl_mprintf("... cp points to '%s', not '%s' as expected \n", | |
| cp, list[i].next); | |