]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: rename CURLMcode variables to mresult
authorDaniel Stenberg <daniel@haxx.se>
Tue, 16 Dec 2025 12:40:02 +0000 (13:40 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 17 Dec 2025 07:55:12 +0000 (08:55 +0100)
255 files changed:
tests/data/test1518
tests/data/test1519
tests/data/test1543
tests/libtest/cli_h2_pausing.c
tests/libtest/cli_h2_serverpush.c
tests/libtest/cli_h2_upgrade_extreme.c
tests/libtest/cli_hx_download.c
tests/libtest/cli_hx_upload.c
tests/libtest/cli_tls_session_reuse.c
tests/libtest/cli_upload_pausing.c
tests/libtest/cli_ws_data.c
tests/libtest/cli_ws_pingpong.c
tests/libtest/first.c
tests/libtest/first.h
tests/libtest/lib1156.c
tests/libtest/lib1308.c
tests/libtest/lib1485.c
tests/libtest/lib1500.c
tests/libtest/lib1501.c
tests/libtest/lib1502.c
tests/libtest/lib1506.c
tests/libtest/lib1507.c
tests/libtest/lib1508.c
tests/libtest/lib1509.c
tests/libtest/lib1510.c
tests/libtest/lib1511.c
tests/libtest/lib1512.c
tests/libtest/lib1513.c
tests/libtest/lib1514.c
tests/libtest/lib1515.c
tests/libtest/lib1517.c
tests/libtest/lib1518.c
tests/libtest/lib1520.c
tests/libtest/lib1522.c
tests/libtest/lib1523.c
tests/libtest/lib1525.c
tests/libtest/lib1526.c
tests/libtest/lib1527.c
tests/libtest/lib1528.c
tests/libtest/lib1529.c
tests/libtest/lib1530.c
tests/libtest/lib1531.c
tests/libtest/lib1532.c
tests/libtest/lib1533.c
tests/libtest/lib1534.c
tests/libtest/lib1535.c
tests/libtest/lib1536.c
tests/libtest/lib1537.c
tests/libtest/lib1538.c
tests/libtest/lib1540.c
tests/libtest/lib1541.c
tests/libtest/lib1542.c
tests/libtest/lib1545.c
tests/libtest/lib1549.c
tests/libtest/lib1550.c
tests/libtest/lib1551.c
tests/libtest/lib1552.c
tests/libtest/lib1553.c
tests/libtest/lib1554.c
tests/libtest/lib1555.c
tests/libtest/lib1556.c
tests/libtest/lib1557.c
tests/libtest/lib1558.c
tests/libtest/lib1559.c
tests/libtest/lib1564.c
tests/libtest/lib1565.c
tests/libtest/lib1567.c
tests/libtest/lib1568.c
tests/libtest/lib1569.c
tests/libtest/lib1571.c
tests/libtest/lib1576.c
tests/libtest/lib1582.c
tests/libtest/lib1591.c
tests/libtest/lib1592.c
tests/libtest/lib1593.c
tests/libtest/lib1594.c
tests/libtest/lib1597.c
tests/libtest/lib1598.c
tests/libtest/lib1599.c
tests/libtest/lib1662.c
tests/libtest/lib1900.c
tests/libtest/lib1901.c
tests/libtest/lib1902.c
tests/libtest/lib1903.c
tests/libtest/lib1906.c
tests/libtest/lib1907.c
tests/libtest/lib1908.c
tests/libtest/lib1910.c
tests/libtest/lib1911.c
tests/libtest/lib1913.c
tests/libtest/lib1915.c
tests/libtest/lib1916.c
tests/libtest/lib1919.c
tests/libtest/lib1933.c
tests/libtest/lib1934.c
tests/libtest/lib1935.c
tests/libtest/lib1936.c
tests/libtest/lib1937.c
tests/libtest/lib1938.c
tests/libtest/lib1939.c
tests/libtest/lib1940.c
tests/libtest/lib1945.c
tests/libtest/lib1947.c
tests/libtest/lib1948.c
tests/libtest/lib1955.c
tests/libtest/lib1956.c
tests/libtest/lib1957.c
tests/libtest/lib1958.c
tests/libtest/lib1959.c
tests/libtest/lib1960.c
tests/libtest/lib1964.c
tests/libtest/lib1970.c
tests/libtest/lib1971.c
tests/libtest/lib1972.c
tests/libtest/lib1973.c
tests/libtest/lib1974.c
tests/libtest/lib1975.c
tests/libtest/lib1977.c
tests/libtest/lib1978.c
tests/libtest/lib2023.c
tests/libtest/lib2032.c
tests/libtest/lib2082.c
tests/libtest/lib2301.c
tests/libtest/lib2302.c
tests/libtest/lib2304.c
tests/libtest/lib2306.c
tests/libtest/lib2308.c
tests/libtest/lib2309.c
tests/libtest/lib2402.c
tests/libtest/lib2404.c
tests/libtest/lib2405.c
tests/libtest/lib2502.c
tests/libtest/lib2700.c
tests/libtest/lib3010.c
tests/libtest/lib3025.c
tests/libtest/lib3033.c
tests/libtest/lib3034.c
tests/libtest/lib3100.c
tests/libtest/lib3101.c
tests/libtest/lib3102.c
tests/libtest/lib3103.c
tests/libtest/lib3104.c
tests/libtest/lib3105.c
tests/libtest/lib3207.c
tests/libtest/lib3208.c
tests/libtest/lib500.c
tests/libtest/lib501.c
tests/libtest/lib502.c
tests/libtest/lib503.c
tests/libtest/lib504.c
tests/libtest/lib505.c
tests/libtest/lib506.c
tests/libtest/lib507.c
tests/libtest/lib508.c
tests/libtest/lib509.c
tests/libtest/lib510.c
tests/libtest/lib511.c
tests/libtest/lib513.c
tests/libtest/lib514.c
tests/libtest/lib515.c
tests/libtest/lib516.c
tests/libtest/lib518.c
tests/libtest/lib519.c
tests/libtest/lib520.c
tests/libtest/lib521.c
tests/libtest/lib523.c
tests/libtest/lib524.c
tests/libtest/lib525.c
tests/libtest/lib526.c
tests/libtest/lib530.c
tests/libtest/lib533.c
tests/libtest/lib536.c
tests/libtest/lib537.c
tests/libtest/lib539.c
tests/libtest/lib540.c
tests/libtest/lib541.c
tests/libtest/lib542.c
tests/libtest/lib543.c
tests/libtest/lib544.c
tests/libtest/lib547.c
tests/libtest/lib549.c
tests/libtest/lib552.c
tests/libtest/lib553.c
tests/libtest/lib554.c
tests/libtest/lib555.c
tests/libtest/lib556.c
tests/libtest/lib558.c
tests/libtest/lib559.c
tests/libtest/lib560.c
tests/libtest/lib562.c
tests/libtest/lib564.c
tests/libtest/lib566.c
tests/libtest/lib567.c
tests/libtest/lib568.c
tests/libtest/lib569.c
tests/libtest/lib570.c
tests/libtest/lib571.c
tests/libtest/lib572.c
tests/libtest/lib573.c
tests/libtest/lib574.c
tests/libtest/lib575.c
tests/libtest/lib576.c
tests/libtest/lib578.c
tests/libtest/lib579.c
tests/libtest/lib582.c
tests/libtest/lib583.c
tests/libtest/lib586.c
tests/libtest/lib589.c
tests/libtest/lib590.c
tests/libtest/lib591.c
tests/libtest/lib597.c
tests/libtest/lib598.c
tests/libtest/lib599.c
tests/libtest/lib643.c
tests/libtest/lib650.c
tests/libtest/lib651.c
tests/libtest/lib652.c
tests/libtest/lib653.c
tests/libtest/lib654.c
tests/libtest/lib655.c
tests/libtest/lib658.c
tests/libtest/lib659.c
tests/libtest/lib661.c
tests/libtest/lib666.c
tests/libtest/lib667.c
tests/libtest/lib668.c
tests/libtest/lib670.c
tests/libtest/lib674.c
tests/libtest/lib676.c
tests/libtest/lib677.c
tests/libtest/lib678.c
tests/libtest/lib694.c
tests/libtest/lib695.c
tests/libtest/lib751.c
tests/libtest/lib753.c
tests/libtest/lib757.c
tests/libtest/lib758.c
tests/libtest/lib766.c
tests/libtest/mk-lib1521.pl
tests/unit/unit1303.c
tests/unit/unit1396.c
tests/unit/unit1600.c
tests/unit/unit1605.c
tests/unit/unit1606.c
tests/unit/unit1607.c
tests/unit/unit1609.c
tests/unit/unit1610.c
tests/unit/unit1620.c
tests/unit/unit1652.c
tests/unit/unit1658.c
tests/unit/unit1661.c
tests/unit/unit1663.c
tests/unit/unit1664.c
tests/unit/unit2600.c
tests/unit/unit2604.c

index 217640f173a3e23d2afe69015c1ecb09a1c547ca..096765e870e7a6e0b62eddab1c4f92ffe34486ba 100644 (file)
@@ -45,7 +45,7 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 
 </strippart>
 <stdout>
-res 0
+result 0
 status 302
 redirects 0
 effectiveurl http://%HOSTIP:%HTTPPORT/%TESTNUMBER
index bbbb8ab6d4fd86af4437bcee4928001aaf65d76a..7dd22528507108a43b5b1df89fa8744e0f4de24f 100644 (file)
@@ -45,7 +45,7 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 
 </strippart>
 <stdout>
-res 0
+result 0
 status 302
 redirects 0
 effectiveurl http://%HOSTIP:%HTTPPORT/%TESTNUMBER
index 7fc723fd289fcc19c5df7399d656418de749502f..2433447c6ac0292f4de3d027dcbb1c5b6bfe8efc 100644 (file)
@@ -61,7 +61,7 @@ Accept: */*
 
 </protocol>
 <stdout>
-res 0
+result 0
 status 200
 redirects 1
 effectiveurl http://%HOSTIP:%HTTPPORT/%20/with/%20space/%TESTNUMBER0002
index 740c9c2226c5dd55d45bf00bf1e9cda86cad7b1a..b5b728ec20fc1a84dd7a21794a93a5953d0dae19 100644 (file)
@@ -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;
 }
index 80d8c031367ff908a5a014a760f49dd4b46c7736..31e07aa4273fd73283ae2199db96c5a6330c9809 100644 (file)
@@ -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;
 }
index 8d5bf8d82ca6a98735e4399f18ef79f0624fa804..1b3040ce22a1377b03a5be61390273d7afc57be1 100644 (file)
@@ -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;
 }
index ca1e343a8d88c976fb16672c71b9bc5f816e1650..9bd954240901e6aab45b64e6fa78e283286d35c7 100644 (file)
@@ -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;
 }
index 1ffb7c243f9413f7bc735e10c60024ebccd1f50a..09ede8488f0fe0b57639cc5f7470c43b4545e1b6 100644 (file)
@@ -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;
 }
index a0e5901e55393021b1cf8d583c6567d4930fc619..5542e5f738d63c2c6e78509fbdd33b0c004bbced 100644 (file)
@@ -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;
 }
index cb94bcf0a83fadb43514155f74fd4d99b5738a79..655b85785f3aa51afc55fc6d6fd60d76c03c7b85 100644 (file)
@@ -85,7 +85,7 @@ static void usage_upload_pausing(const char *msg)
 static CURLcode test_cli_upload_pausing(const char *URL)
 {
   CURL *curl = NULL;
-  CURLcode res = CURLE_OK;
+  CURLcode result = CURLE_OK;
   CURLU *cu;
   struct curl_slist *resolve = NULL;
   char resolve_buf[1024];
@@ -135,22 +135,22 @@ static CURLcode test_cli_upload_pausing(const char *URL)
   cu = curl_url();
   if(!cu) {
     curl_mfprintf(stderr, "out of memory\n");
-    res = (CURLcode)1;
+    result = (CURLcode)1;
     goto cleanup;
   }
   if(curl_url_set(cu, CURLUPART_URL, url, 0)) {
     curl_mfprintf(stderr, "not a URL: '%s'\n", url);
-    res = (CURLcode)1;
+    result = (CURLcode)1;
     goto cleanup;
   }
   if(curl_url_get(cu, CURLUPART_HOST, &host, 0)) {
     curl_mfprintf(stderr, "could not get host of '%s'\n", url);
-    res = (CURLcode)1;
+    result = (CURLcode)1;
     goto cleanup;
   }
   if(curl_url_get(cu, CURLUPART_PORT, &port, 0)) {
     curl_mfprintf(stderr, "could not get port of '%s'\n", url);
-    res = (CURLcode)1;
+    result = (CURLcode)1;
     goto cleanup;
   }
   memset(&resolve, 0, sizeof(resolve));
@@ -161,7 +161,7 @@ static CURLcode test_cli_upload_pausing(const char *URL)
   curl = curl_easy_init();
   if(!curl) {
     curl_mfprintf(stderr, "out of memory\n");
-    res = (CURLcode)1;
+    result = (CURLcode)1;
     goto cleanup;
   }
   /* We want to use our own read function. */
@@ -189,14 +189,14 @@ static CURLcode test_cli_upload_pausing(const char *URL)
      curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, cli_debug_cb) != CURLE_OK ||
      curl_easy_setopt(curl, CURLOPT_RESOLVE, resolve) != CURLE_OK) {
     curl_mfprintf(stderr, "something unexpected went wrong - bailing out!\n");
-    res = (CURLcode)2;
+    result = (CURLcode)2;
     goto cleanup;
   }
 
   curl_easy_setopt(curl, CURLOPT_URL, url);
   curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, http_version);
 
-  res = curl_easy_perform(curl);
+  result = curl_easy_perform(curl);
 
 cleanup:
 
@@ -209,5 +209,5 @@ cleanup:
     curl_url_cleanup(cu);
   curl_global_cleanup();
 
-  return res;
+  return result;
 }
index 35da27788683898a9d6a26044b38da2132babe50..1e5fd12afee9e3089d11da4bd962cd860f663858 100644 (file)
@@ -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;
index 8449b9d1278f8ce4834df4821876a244f008dc91..5f932d1bcc0f273f23eb7550696eedef68193576 100644 (file)
 
 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;
index f060560371ad1acfb8d6537b47eb448056a67b9f..dd26a146a423ccceea08c14cb41e7d2c13ab4735 100644 (file)
@@ -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;
 }
index c536adc2ca60760ff6de41be63e5e1501744848b..1753d8ea0d3abf00dd3d94df3a634a38bc0c336b 100644 (file)
@@ -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
index bfabd4b412a37b05fa275ee06dfad7dde9982431..d1cb07121881e8fbe854aee4a1865782afc23db7 100644 (file)
@@ -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;
 }
index 6a7e71d7923d59d69eda3b4fdc88a94f7b4a8e1c..c794559428198a130fb34d2a8e889f28d54483f7 100644 (file)
@@ -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;
index 828e1ede74dfd57b0545786272fa8c9cfe8eb3d3..a4eb07a628028a80a468e9b046d2eb5ffaf94630 100644 (file)
@@ -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 */
 }
index 921d1ce8b182b9d40e02c80317e9ffed6e361d5c..02c304795b0ff601a5e2070aae460c2b3727d53c 100644 (file)
@@ -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 */
 }
index cd1cd874f77715cc4b7268512f9ce50a3c3c6d10..5a6eacd09ffd36a59c98fcc6fc18173dbff0dd87 100644 (file)
@@ -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;
 }
index 1546acfaa8ada0f9f250ec27fafda88b57201f99..4b52a8050ba9c356a0a8c8ac61fd803ad13e8f7a 100644 (file)
@@ -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;
 }
index a2d60e175758bd38ceeecea3351c261e464ccf0a..2caa8f8ed80a2b3e424b544979af1564617280e1 100644 (file)
@@ -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;
 }
index ffdaa50df6d3ad287712f3951e4f4fe21a178ce7..67ccce00ee5bb2e1d1f602912fc266bc2de7e7be 100644 (file)
@@ -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;
 }
index 446e8231a52814eb20893c33d4c968d59ba8bb23..f3ae79cb6258d813302d447a2f4dde0615e0a1d2 100644 (file)
@@ -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;
 }
index 16935de7a7576e16e85e66d09262bdb22664228f..0119d4bfed1d0786b0da9dc7d0948d3cee336e3a 100644 (file)
@@ -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;
 }
index 7a70763813d8e72073b8ffa5dd0df48c3be0abbf..0d7a155feb51673a7110880a75ab30d34addbc2d 100644 (file)
@@ -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;
 }
index fb65dcae988f6745ec0b0a02bae91c87de898433..d6897cc74835f4c0713ca10d36c7d8f2c5284099 100644 (file)
@@ -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;
 }
index e5c78d3e63b09d6e1dbf2d6e2b54b21afa89a569..10cf67e1d207d759078af86c293c9e0773a25064 100644 (file)
@@ -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;
 }
index 8bf1613fa17b2429df13194ff12937c06f80c751..d5148510d94a696c6d2a36217dc18ccb4f9fb5b7 100644 (file)
@@ -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;
 }
index be81c0e556e82767d4f66b9fe29b0118064306e5..7a7a76fff0ba4014ce13eeae39838f1cc93334db 100644 (file)
@@ -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;
 }
index 7833f06a10f6cef8d43c259e2201287ab99e2358..dae7acce506d26fe26f49791dad67287c56d9abc 100644 (file)
@@ -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;
 }
index ab18efe11314e2336f5a3eebdfbc21d47f190bab..7abc2ba1391be3fef6682dda07557cc13afef60b 100644 (file)
@@ -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;
 }
index 1ebe957af3f725e7b241eb6c24db970c13f8298a..3320a983ca3be60c793fba300d11805a5655c1fb 100644 (file)
@@ -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;
 }
index f6e41f16b12d8e054077b38bdd333e892ee3a74c..c439666c9e05a22c38abdddbdca2677f2a93b91a 100644 (file)
@@ -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;
 }
index e90b39bc56762d20803aca104d9962b802da6e42..56a6992bdb41e565c0be5bece459cb9226df21a5 100644 (file)
@@ -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! */
index 23ec23d82305c98bbc9bd376c94e1ad9711f0d0c..47254ffcdf14fd250ebaac1de287ee939f377ab2 100644 (file)
@@ -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;
 }
index 66c18df21e407237794b44360fcf707aef449621..3c558d7c26466ecd68516a919780a1b95546b799 100644 (file)
@@ -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;
 }
index 400544b8e038a97392620e06e20994a2fd649600..eac11b60aab5b1ef67abc7aeae7a83a85a6e70b7 100644 (file)
@@ -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;
 }
index e55672a3c0cc4be11c9949ce41341ad57f90e495..af9f9fc21f08f2e11708e4ce8a67ce0d346b5881 100644 (file)
@@ -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;
 }
index e1dd3657fe4260c4f1a7645a6b42376d26545e0a..d5c6030222a682f1730360a4d89edaff063affd8 100644 (file)
@@ -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;
 }
index 24cdd78b0315a7cf7803f1e82855ab6660ba9d2c..df83e54eb7d1b4df1332fa10d40538847452c127 100644 (file)
@@ -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;
 }
index 6cb6d59e874f7cc4fc4d8f9b35792c10819bc435..39ee30b6b80562fe1ace32c3f21abf0e78705719 100644 (file)
@@ -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;
 }
index a3554434e643a3a47e0adbf994cf49ac5b34fe91..86facffbb648994eee332b7bc639609f9217496c 100644 (file)
@@ -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;
 }
index e1c5c047027871c0906afc7108392eb31e72eedf..533abb3e7892c8e402f765de0808db956f3ae9ad 100644 (file)
@@ -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;
 }
index b859ee36649c0172a5edb8b5f42b6dcb10e6085e..6e7d1a471b674620c748e3c9698eb219cb02e4e6 100644 (file)
@@ -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;
 }
index 94a02c2986b1abca3b979ed79bf12d1ccbb9a206..e672d585ee111322c22c48bef3e387aa83fa5016 100644 (file)
@@ -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;
 }
index a9480429faaf305b9c2eb48ce02f2e1cdffa7886..aae63fc9fa71f010c838facbb4712a704fa8d49f 100644 (file)
@@ -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;
 }
index f03e9d98ed8ec3dd8976faa48aeef84c0cbd4eac..7f2e415414991bd26b6d7fddae50ed2f7bc889ac 100644 (file)
@@ -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;
 }
index 9d59725fcf89e16e58e57f59b95a088d6b823839..c9668c0ddf1090aecf2e6d10dd91a4c26842ceed 100644 (file)
@@ -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;
 }
index 2a8830c5cce92dd58b56913a1afb8bb3488aaf34..6a1db4e93e46f765ecaae0087f7349ce6df6ec6f 100644 (file)
@@ -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;
 }
index 849431e79633775c3a95351747318dc42fb79d4d..ee18046f4270012dc5a6389471671fc2ca551ba7 100644 (file)
@@ -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 */
 }
index f1c8c6791a9a1837a170087185fab44036ed4b49..2dc0d2cd26112473f4858eb4b6b076d32c25beb1 100644 (file)
@@ -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 */
 }
index 9a6ba0b36e0aa92c4c4e0756e01a7d7a68a260fe..2ea59a5cb3a087a2c29b2bedfee6b1b847ad4a0a 100644 (file)
@@ -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;
 }
index 7bb851f36e18e427631cb49f6171a12a40e17f74..979bec8b026624a69d2482451bd1ddbc3ea6d0fa 100644 (file)
@@ -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;
 }
index fa9515e4f6cb6818f672402eb776066c784cbcaf..ce5d70233133309171d8b7cfe1fe5af69572b9ef 100644 (file)
@@ -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;
 }
index bd9fead1eae8cf41c3e945483b59725bc8244486..8de7b84669a2e7b9244a68d95e8c20a2b4c4d2a3 100644 (file)
@@ -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[] =
index ce4989a6163db3a6573f71fb0989b6c0f651505b..b8e460748e044637f198883b828875200f87eee3 100644 (file)
@@ -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;
 }
index bceacd354cdfc680528097aa3ce10aae9ca211c2..bf70452f6cf1446fe3aa930f31e98ae1e8d44d35 100644 (file)
@@ -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 */
 }
index d1eaefee4a4e8906ccc49ee7a009aa52e29781c2..dd236cf73b5866b911d81238026e5f48ed740279 100644 (file)
@@ -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 */
 }
index f330b2df7d90c38e83ab7fbdf0f4042ed8bc552c..4b4b07cb0c41bdba90f0ab24a65b891d6eda933b 100644 (file)
@@ -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;
 }
index 001a8f5bae7e037386b0d259d5f8b46a0f21ca12..4932fd24f7cd4c97715c76840d27a72f43af0c87 100644 (file)
@@ -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;
 }
index 94d409295b3f71a01947db52bff9cebbc7b39c60..f6226bcf6026561831d9be846d2faf76b3457b06 100644 (file)
@@ -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;
 }
index 28162a1b03428b21301d1ffc033a0f2e03815f3d..60662aac809f321ba067174cbc11e892ce1edb06 100644 (file)
@@ -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;
 }
index d299405fe214805c4d86567ebd89a2d02a27a3ed..4077cb8eb1f556ac4cd5155c2a36f96535406003 100644 (file)
@@ -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 */
 }
index 30773add73566ae6b11428f05727231b7de57929..4cf3953b4fe2c9ba4137651dc3e6874ce4dee3d0 100644 (file)
@@ -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 */
 }
index 23d0c2cd6f43ee82e8ec216b0755c97c242993de..573ec917114ed154329fd4e2d8df8d11cc5789db 100644 (file)
@@ -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;
 }
index 5bc0e3465d58d7bb7e22fb877d5ab2a7e78cc784..765650af3b3135d44749b918205b6add4279b036 100644 (file)
@@ -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)
index 539da3c34f8684fc1980b86b21e4d5139223f462..7d4d623350270edd59911e26c5c966a932ed3ca5 100644 (file)
@@ -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;
 }
index 0db1e49e2f7a4220ef81c8785a6252c14cba7f0d..68c1734edee9d21b275127df35a2d27216192c3d 100644 (file)
 
 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;
 }
index 44d77a5d455bb909ce7d65708e74d721aacba0e4..52dc364b056ca0f3bb4e8971b4adc11406a47a93 100644 (file)
@@ -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;
 }
index 8b29a9a1bf172ed617d3531a58fa98e21149dccc..adb6cc21554a86232bfb78ca12feae0498b87a03 100644 (file)
@@ -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;
 }
index 9a5d415193e3f1f12e77465b77a574fd138f22b3..daa85a6652e2ef3f624f69b189d7aa51ebdeb0b4 100644 (file)
@@ -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;
 }
index e1877a99ac5a0c8c9a54c284e66e2ff115e22ba1..31e8d17c41c1ccfcf3bc96abd595ae7890d77a00 100644 (file)
@@ -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;
 }
index 42761c3065d29d55c56d5a8ec7aa4b7cbca503b9..5b2b913037b81a32fb56e24b7e256a334305e902 100644 (file)
@@ -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;
 }
index 021a016351a1c334a2dafb957e4a3fbc5713fa8c..29dbe0b70033d15aeed4edba18159df172460496 100644 (file)
@@ -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;
 }
index f8d7be9d72732a3c1f0066d5732a1f1a0a9c929a..1ba6351c552ff2e101041e104090ba06523002fd 100644 (file)
@@ -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;
 }
index 6cf5cace5335e96fbb1d49b3ba42da17d326887d..1a6f16361c18e6a1a124c324be042529c56d080f 100644 (file)
@@ -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;
 }
index d5124a5141e937402b5cb56a6f16ec26919181af..2603484167a538b08b46ae90ebd34bede1351a5a 100644 (file)
@@ -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;
 }
index 8d9ec7eb8e6b298b46e3fdac36f4b2d54d6792a4..50d715ffe7724fdb26793934ce78fd9a44d7e734 100644 (file)
@@ -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;
 }
index 5bbdad81b2eea7a295a0e33d7a3a52169af7eb8e..62731be16b017205f1e884525ebac168031835a1 100644 (file)
@@ -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;
 }
index f1e7b55df41431738285dd34e66b71df64d216f3..630dcd2f9059cce699b63d1471eee21d522b2a48 100644 (file)
@@ -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;
 }
index 04ce5aa9f1977d5088ef97031792061ce719a10a..599085ef7c1ded3e04769d29dd6b909268073484 100644 (file)
@@ -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;
 }
index 4494633b94f327b8070fe0a910b7d0762c2b9c51..638e012b5ddcdaffcfe80e66f4012ac8b300f929 100644 (file)
@@ -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;
 }
index e114554ec526e71ac42f30b1b5e52d367d8f2f8f..da3b23a349d4bbc5b75d2331b158d197cf789543 100644 (file)
@@ -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;
 }
index 19c2f50e197aae20527e80324d25225c3f580f78..b63808667f0cb64d4998325741102088187b6a3f 100644 (file)
@@ -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;
 }
index 07404f8b905455a36507c1a0da6b18870b8d0936..5ac2105dfe45312acb239577af4bf059d7507b27 100644 (file)
@@ -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;
 }
index ebf106d3b1e45c403944a5c7a30ed64cdd6281af..6aac3751522595d279269e580be0791b191cf82d 100644 (file)
@@ -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;
 }
index 2ceb04d5a2430549420ff104676c7834aa24e6a8..f7ead3406eb7b9691cf5d2610f792e1bf30712eb 100644 (file)
@@ -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;
 }
index 4f22777526929fc9cebbf78578daa8d160b11fb0..d8b9f7abdc7f7694857f480c6ed1952e6277961b 100644 (file)
@@ -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;
 }
index 9ec68749182f45da6369f678f7921a9cfa45eaa0..f265174891d797aa9b9bcd2f33f2d63a346271a5 100644 (file)
@@ -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;
       }
index b4b4ab720f83897b913b82904a9ab2ae078907c9..8f3c397581df53e44238e42d7a9fc55305fd57a9 100644 (file)
@@ -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;
 }
index 406cea0205e77481523fc2cb515641b09538434b..6a5be3874a47e3af581e795c21350e67acf465cb 100644 (file)
@@ -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;
 }
index 4c66b1b97ead29498813aafb38ef9a1c70a985d2..a67b68fc9cd5505788ecd369e877a6acc2f20d3d 100644 (file)
@@ -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;
 }
index 1a436b00cea393f703f9a9515e336184008c28e2..f970b0aff3c29e1f7e570a1bb722d7dba1ec87cb 100644 (file)
@@ -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;
 }
index 8b02f16aa7f88787268da68042117fee9d28a6d3..bd31f9418a3eb6584c5890f670bbf1fd07f4c943 100644 (file)
@@ -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;
 }
index 465dfeb5dec65f65ae914b1c084a1633518f4632..41959ad60ef73cc446e5f5d7400bbf7178a11429 100644 (file)
@@ -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;
 }
index 61382399a32f68ddfe481364bf967831ed930dbb..9b7214405b4b4ec89e687f6dfb447b2a9ba9c7b7 100644 (file)
@@ -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;
 }
index 20b170397e3c1ae39cf79cf1da032a8e1ce77ce7..b4908f09735c0f219b508e77ca34260f59c96d47 100644 (file)
@@ -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;
 }
index c6fb120b6ad6f99a95ead5891ad46afe2a2262af..03160f4ccb8cc4363e041d8cd9d046172a9a023d 100644 (file)
@@ -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;
 }
index b93f993a4541ebe93e0246ce92ad67c25f02c305..6b56d7c2f8204a7255edbed4d216d649b9541eee 100644 (file)
@@ -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;
 }
index b3d79fc68dd131279ed43a92d34679b88434fec5..51b9538c20303bb853f0dfd2605ec9f29802c266 100644 (file)
@@ -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
index 1d9975534ad9a5debff54dcac3944f935846458c..66aa63b46b7b1536334da0ac9416dbdc1da760b5 100644 (file)
@@ -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;
 }
index 07a01095141537f76f8a621cb6497061aad63cc1..0eb5a6873e7791d3febba272d1725fa05a46aaf8 100644 (file)
@@ -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;
 }
index 43e4c274b825e253d182850fc26c134a95445b5a..4fe2bf58015859d4c89bf2c7708f63fe6a8530a1 100644 (file)
@@ -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;
 }
index 024080e3e4910498949e6f54197dbf5073ffd2c0..947469549ed85f8b2816231137802ca1203f2c75 100644 (file)
@@ -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;
 }
index 3fe118269e82142c74a5dfc3a6b650795d59c5e2..79fd92d6ed2c7beea34301c21a62b9b1b4172514 100644 (file)
@@ -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;
 }
index a86a4c9e4ca3a3bc19fd5fbcecf30c6daa77e2f9..c9a4d405e26b7a714740471f6bb00608003a71f7 100644 (file)
@@ -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;
 }
index c7864a150c47b20a5f58a9626fedc377ce6bb80e..ea422630314101a950b3ff2978def7307391fd3e 100644 (file)
@@ -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;
 }
index 9a7f12f286ab8bfc83171ef17c080a91316b8e63..cae62c239297c807a273c2a38df5017dff7b9046 100644 (file)
@@ -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;
 }
index 6739cfe3ab9ec1ae04c3470bc1298c3c447b18b3..1f6e725856f325072d685d5ba959555a327623f1 100644 (file)
@@ -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;
 }
index ff8ad76bc12b3198c819808bbe61ebc5aa8e26d2..1e31cc5b3a68e52c50dd8e13e0a8cd81da2f9685 100644 (file)
@@ -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)
index 9536575ba82d357910ff28f84f3fbcc0c9516026..17199ba8980b9d9b65af72b14b44abb5133d723c 100644 (file)
@@ -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;
 }
index fa110462c2c65bd11ce123e509b482194f986a85..d9b659988c941db3be2352609329e641d30daae0 100644 (file)
@@ -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;
 }
index 982f06b28629eca7c75882ba8e3a5b26bcd474bd..4ae7bef2a3c16a09161b7fbb3ccdae365a578e2d 100644 (file)
@@ -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;
 }
index 7931e866bf70a3ee6462a160d663655a7933ad06..98609bd9296386bfa7a38ee50c1346e5ccdc7239 100644 (file)
@@ -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;
 }
index 2cc1c8ebfe0c512a4cec972c27e9642067451922..508b16d261d151f8e9cc84f6877862254a2c191d 100644 (file)
@@ -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;
 }
index 1534cfadeeba43cad08570c04fac69489277d707..ae496591fc2db8aa43c2a61ebb32e63ac8855d5f 100644 (file)
@@ -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;
 }
index c5b6568a07b10243ce5ba6a454b2d777e6536308..fded2cd8f0edcd9ebb40c8f6873d00241ee8ee16 100644 (file)
@@ -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;
 }
index 06ab698c365e6e126f87773eaa14c1c7d6c9d848..5813cca4ea4892f2d7e8cfd51238b7a31dcc3fc6 100644 (file)
@@ -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;
 }
index 6c06e727dcb1cf3da097c2aa2c2fe75e4310d1e8..4f3ef11fd064ec1834496d4f55ec6685b4c0f7a0 100644 (file)
@@ -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;
 }
index 660d528b2a378bdd91f7d35b11d6c35f8067bcd4..5d99860039c56dd455db8d7a0436ae2109335225 100644 (file)
@@ -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;
 }
index 7dc549f84e608ad63ea5122a53ba97a476e6acaa..c1377cfd2f910172417b3a269c778ab4f17fbf6d 100644 (file)
@@ -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;
 }
index 9e41d43b0dd7045dd1e47f26e4044468bf745d27..87d0f8eada4b08f03fbbbee8949f73189c00e979 100644 (file)
@@ -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;
 }
index 70c40fa4c75f2d55900cefe76010a24358fc7733..6449f6bd156b123882018fc690a2235f64c782e7 100644 (file)
@@ -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
index aa0be3d5140d55be4c2516a83605e4893f06b922..ef8990fc177f8406f765fe3ba33b79268087a307 100644 (file)
@@ -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
index cc86e76a10dc63621a37104d2a58362b87ad5587..fd2a29da6c46b79920c9182374517b54019a5b05 100644 (file)
@@ -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
index 6b60ea6376097e121cae09b140ae5d6c053543b7..fbfdc635e825a1276bd53547f081979e4974fb02 100644 (file)
@@ -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;
 }
index 1f7e6a4a2f4207a7a93853e1a7e51bde04759ad5..40d77019d1e95d46ef4ef5fbb35aa7cccf8e1675 100644 (file)
@@ -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();
index afc92803d01ab48b9de67fce371c069685ad1a4d..c58b7ebbb4c67ef1b49a0ee3e2c054764fed183d 100644 (file)
@@ -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);
     }
index 5f727f98e624e29cf3b7fd8684f5c4f1d59a3a1b..93b2e382ecebd1ce09796322b6c90e6d05264bea 100644 (file)
@@ -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;
 }
index ef83a2509ed7837da96679e5ad21ca1eb5d574f3..9999f965df8b0fc19eff33b38935a5b8a93c32df 100644 (file)
@@ -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;
 }
index 7979d122e4e936c29a5a68662d943bc5f98b1016..a87ff0b5e5963b5a9f8990d72e1720761b68e2bf 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) Dmitry Karpov <dkarpov1970@gmail.com>
+ * Copyright (C) Dmitry Karpov <dkarpov1970, 2025@gmail.com>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 /* ---------------------------------------------------------------- */
 
 #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;
 }
index d7ab413f25a81b7e136215c29ba198e3cd311876..4743afc11996bb6daa1c1b0a3d5c5a3baf9be438 100644 (file)
@@ -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;
 }
index 1c38f073d58cf2eaa9365d22bd0503e38e762125..e8199e0364b641a86c33c07a0df2d30e66a1ee00 100644 (file)
@@ -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
index 0f805c2d6f7f7b0d22f92e70c4f6c89363f4f40e..5c7104a41433afb27997ce07e6f88ad1f17784ac 100644 (file)
@@ -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;
 }
index 7d94c406268447426af390095b5dd670162e5c45..362325311fe64c5a77c7e1c16b038fcfd8ae9a8c 100644 (file)
@@ -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;
 }
index e2f0099615f513207b0dee0ff5d4ce6235eeea0c..7fa4731badeff2ab47783bd48f8b2b48a4933f0b 100644 (file)
@@ -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 */
 }
index b21c68d153f7a10c9fc55802332f7128214d13e2..5c693c5ce8543ede9eacdf339a41e7a728b7830f 100644 (file)
@@ -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;
 }
index e9a2b4111c777f230142838d37f9e4c0ac6cdce7..8d7988af0e492b1c532f80d937729dc4413c9780 100644 (file)
@@ -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;
 }
index d95167f0ce6dec83d8b636e466663c3c13575cd7..56fc27467ad5f20d61a9b25aa8c5225c17824495 100644 (file)
@@ -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;
 }
index 094b32c1fc56364f5851a4991435cc30f18b9208..8313d54be0578c9729d118af96d7fd77519465ae 100644 (file)
@@ -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;
 }
index 4e3a0d79fd4de6a33c35c2da45ca8a079a1c2e03..268f3f09874c5605b7d0dfa23418c911d39f2beb 100644 (file)
@@ -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;
 }
index 278aa515b1de30e0f42f5eb07e1034fb82f98b40..4c9b9090f0cdb4109f2c8a2a712f03b5a9a72460 100644 (file)
@@ -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;
 }
index a3cbf28bb8b554d9a35958b12ace1dece8bfabd9..b269e6f75eb0c7c86357cf2a32c24742f5825a2e 100644 (file)
@@ -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 */
 }
index 76dcf4bac9a84e32e7e0c27106bd3fd428e56569..7b8f947df6167df6d1dc237abe7bed7c048e26ea 100644 (file)
@@ -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;
 }
index befa92e6d0ca3b43b0568676de2481a0f356859e..70ecfd9cad9a86bb9aac1d6adbe4461fd8cc28cd 100644 (file)
@@ -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 */
 }
index 0d01b01026497952c856d687c5ab8ababfce8cde..79302203146ca1e2946b3d51c33a1640b9953133 100644 (file)
@@ -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;
 }
index 3dbed1cd4ff57f8c2e66f25d3f5db558b1eed0e3..358594c0377e0c71871c87ee1070200613051c45 100644 (file)
@@ -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;
 }
index 4e1fc14a97a710ffa4138ecf8c614c327eebe67f..ebdc837fea2f3c36265389dba362edc1a19821a0 100644 (file)
@@ -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;
 }
index 48f0b671b91a2702c0385d3dcfb2ef686fa2d53c..384dfc86c058004df1ebdacf131674b97d131914 100644 (file)
@@ -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;
 }
index 996130c246d48dddd2c9aed6848e710047472e16..ecf0ee0c4934c61b9ecb096e73169aec9741fc4b 100644 (file)
@@ -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;
 }
index e33614fc58a8aab18ed7ffa4d79882022608c4e0..02b17de7328dc2ee97d1589ce7db7851791bb825 100644 (file)
@@ -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;
 }
index f5c44c3e4726b91f6e98bec26792452916b38e2c..82caa8a2d4a7a05d0a24382521208bd43275ed2b 100644 (file)
@@ -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;
 }
index 0496099ce204b8d80343ce80b25abecaf9570ff2..fec4fbaead34b8fe2ddebd7408641f3cfadec5f7 100644 (file)
@@ -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 */
 }
index 144f967f4a848076c78fa0cafbb04f6b0375f577..e5823c510c14e1f6044b7c95df74fac812353dec 100644 (file)
@@ -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;
 }
index 4f074da8ab329c9840386a0e9eda5c75f97e4b37..523833ea61cac9b734bfc990bbf84d143ab320ff 100644 (file)
@@ -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;
 }
index 8d4b6ce15512ad9f5e31d23908abbf501ba72ad4..268bc6349ed81073d203d5fa940002ad83693463 100644 (file)
@@ -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;
 }
index c4e78a1117ec2634c60ba40404231c50702ad262..d87b4805bc7b887dc8781065c3bf5b89d2c0f6eb 100644 (file)
@@ -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;
 }
index 1458971007ece34a7e2635460a9c93c9c342cdd6..fb1ead53be92051701f9266aa1e6ba19f0ed1018 100644 (file)
@@ -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;
 }
index 0ce96f5be81fe6533bcaaf6bb1cceb7dfa65a417..89db0645821be1abe4e5a3d7b24a51f1c7f272a1 100644 (file)
@@ -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;
 }
index b0d3a65d507300b369d92bbbb587457e72b508b0..9dcb17271b355d4c0973d7fd0e4eda2c2ed82455 100644 (file)
@@ -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;
 }
index 42b63c9d87d045fd94cce2363375dc3805b53507..21d6d945bc0cdda697f912be4ab9064427b28568 100644 (file)
@@ -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;
 }
index 5488d4db04446d65014cf3a7828f27574e443924..8431ed87d7347937f504266ac286376ee912fe3a 100644 (file)
@@ -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 */
index 0d2f23e0d355c78ef2a19523237b5e0d08ef729b..3ddc93541b4630312df12378ea8d1df3a7062b90 100644 (file)
@@ -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;
 }
index b3e67864e21ec2ea3ed95687e7f502f6a4dd1c56..8987c9db6030ddd820543d418555c26a7852767f 100644 (file)
@@ -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;
 }
index 0d2bacd16de10489a76f1108bcdfdafe78e3e77b..002d0729237469bfcab086476d5b4acc8e5138cd 100644 (file)
 
 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;
 }
index 60648a7da1fc3034165542ffc17ce768dc771c8a..40a2d3f741a8082746f4bcf2559ea79943cf6625 100644 (file)
@@ -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;
 }
index 5b7e01c087b54dafd31dd0fc611dd552ce5207b3..3d5ac1ff4beb3f9a85b9a57bfe13420f1e68432a 100644 (file)
@@ -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;
 }
index abc75644ce5bc5e28a43d5dc6e405b52960e4ec9..6e6dcf1d40df20ed61d7a82fd39578e748b0736a 100644 (file)
@@ -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;
 }
index 04e8759c1a712105d1915b5a9cfd3513b7c995b0..2a3461a80aa2568183c581a59ebd8404fb893b27 100644 (file)
@@ -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;
 }
index 4e184361362c88eb43374eef387e42b941d66d94..f41530e3857b1d18d2381fc233344ea3c4c7af44 100644 (file)
@@ -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)
index b730960695a6345d92d8d1d0cbe63a6880794da3..188732f8e59add4685e65b50db5c14e140e9b6e0 100644 (file)
@@ -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;
 }
index 82d839d772ea57b2af57cb6e6d37658b6fb4fbdc..69208d1dcfdeed4dfdea10063d5ec31b7918f43c 100644 (file)
@@ -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;
 }
index 24d166b5cc10089e6d5e0bdb62688916591e9aae..436a9eb0a49bca906829b12923899012be120f62 100644 (file)
@@ -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 */
index 1e6c0fb0ef2f719852c239901acc89467f549f72..631718be053a29c348fc4b6a23d401887da8ac68 100644 (file)
@@ -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;
 }
index 21886cfc74c59b9c5317b5a6823493d13ee3a057..b8f2d3d8a48699cd82dbbeca424a27054a983bf9 100644 (file)
@@ -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;
 }
index 891c2de525856141f2fc3de5321ed24f37626561..9c79aca4c4eebabfe81eca0676aa8339aa413e6e 100644 (file)
@@ -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;
 }
index d6689517c7d269cb6b4076a7b5411130934de71b..fc71ecfdf0745eab208553a236b9f9768abba3a8 100644 (file)
@@ -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;
 }
index 670f45e54024173603cac309f34995f6d6a87af1..f112b89ccd8b0133298b8acdf7645d62d81ce885 100644 (file)
@@ -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;
 }
index 77daeb5da8ea822feef67281d81ce56db38fa88a..4740911666cf45f7c364980dfd9f8595c6923a8a 100644 (file)
@@ -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;
 }
index 797e6f1fc6b6357a10f2fdfb46d6c7f5efd9e867..cafb845f70aca77bc21fc3c4d191f63dd181f38d 100644 (file)
@@ -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;
 }
index 2793f92bcb51921117d280f0add8f978ed1959c3..e7c5023cb773373c47ea92bc9df2af26b4f6e204 100644 (file)
@@ -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;
 }
index 79cd877b1baa087a9c2bad2b7a4576c93b022a4e..fda2eee2c17e135e3ae771f161997d6c3bbb484a 100644 (file)
@@ -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;
 }
index cbf4b3013ce49308738ef6637a1365ab9a38f89d..75844144bd38ff7e3395b49aecbe6f7d109a732b 100644 (file)
@@ -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;
 }
index 0c8349159e55a0561a2562190980c5cf08ffd203..7b882959ddaa19675ba912bf0910831ea7d09b49 100644 (file)
@@ -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;
 }
index c9522f5eaeb5a4d9b8226fbc4dd3e02050a54084..b0573b7f1a90da06258190c30ac5c5b4e3597fce 100644 (file)
@@ -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;
 }
index cdf9ebe94194cfb5fb4095d2c9d809eff4487808..f71ec5e6adb928b494fadebf40f4836c4c5b5445 100644 (file)
@@ -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;
 }
index 27afa3c9d30ac1d655308906bc0d334ca525b4fb..b586e8d3173525ab3c2bca05683d4f646a8cb69b 100644 (file)
@@ -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;
 }
index bf9cd86e639edb842dcff2d12747a7dc8d7802e2..1f14b7df435a45eeaed3fe489f011711513f0e75 100644 (file)
@@ -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;
 }
index fc156f43d7958f8c6995dfcb96fe0f52f26eaebd..32dbf2e460c348b10fd61ec358dbd5482ead392e 100644 (file)
@@ -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;
 }
index fbe2560147df5e67cd4c6038d49bae237fff8e47..528b2938d3d5700861df1351fe65526f3e74338a 100644 (file)
 
 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;
 }
index 56acfe40f72adbcbda50feafbd388c4ecdc43f39..41c3bc8c41b1536d363448c642d2d377f99546cf 100644 (file)
@@ -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;
 }
index 89adbdbd9c758823c5f3c2bc08d91b20d5cb8e51..3b30092b289efb6b566b48216ed0f3af3a11ab5b 100644 (file)
@@ -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;
 }
index 95b66f102c258f9f72537e7b2ddb51873d156218..ac4516e63ed8aced6d1956283184cddeaef3cb1e 100644 (file)
@@ -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;
 }
index 46e94afb53900f04f958106d238dfbe3effd39d3..302053febd616c6824d24a538aa8ff521a74729a 100644 (file)
@@ -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;
 }
index 77e0471e5f4e63a93e2b0eddb663d172d68ea8a3..211dd6bcc194aed89f51273f0dfe7590dc719f4b 100644 (file)
@@ -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;
 }
index 1a1656d798f5b2fe99147f57fe2bc5ad4225667a..5f2ab2d6eff15d0c6d8e6fdf317dc5f85286645c 100644 (file)
@@ -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;
 }
index 678141b1c54525ae0a9234c7470bbb99ec07dc81..073aabf4e9d66d17ed1d6427b353dfdea0517ee2 100644 (file)
@@ -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;
 }
index 5e54f3549b92ab44b8279b7ebc6f69c75cfcd9dc..657ef56cb072353518b37b2af566be48099c7658 100644 (file)
@@ -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;
 }
index b19782ce0d6ff622ff75432f76f3e5671dced1cb..1cc45cbf1047d620477dd1f98f519bd747f4498d 100644 (file)
@@ -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;
 }
index 52527c7f419cbd10aa88558bbee8816e2529c48b..6f1f061ee2b2a056b7ee5849502594729f6a0cca 100644 (file)
@@ -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;
 }
index 4709708a52bd8c1334943c5f540e25e2444d1feb..6e7831f9d4836ad3d016bc2a11877f793f35a4b7 100644 (file)
@@ -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;
 }
index ae5f5d40b35947f5ddc55f933afa7ce77eb1c2c9..a50d34c02503f3f9ba018b2e473075b284b53fbc 100644 (file)
@@ -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;
 }
index 799821123df266735ab959ea9ea34aa7593d6990..75b3e8af36fa65512026ae295c1148c5980c4303 100644 (file)
@@ -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;
 }
index 05d4a8432e63b3869a0f6ac0f03bd6d72d920d05..1d1cfc3901590b99a341175e45281126a6e84781 100644 (file)
@@ -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;
 }
index 3940d9c4702c6807ac53eedf051a0aac3307f261..1ba6b947faca41132fa6116a68694b908850df40 100644 (file)
@@ -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;
 }
index 8f29e310c7ed14e28567701f7cf7083567ef41ee..984764eb12dbc87f33954eadf215a0c81ae26faa 100644 (file)
@@ -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;
 }
index 310ad77f39f4e2871c4615a114b595951c3dfdef..3610cbfe06e1e387fcad0df02118980d21b123a6 100644 (file)
@@ -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;
 }
index 46b2a22a05f27ebf85bb8d23c2258fe7e392583a..b8d9e2350d4b5c1ff8e9bccf501ed6908eabe5b9 100644 (file)
@@ -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;
 }
index bba31e9da4e2861d0b8115427e0aaae6d597d68f..1cea00b6e24a311829c03623ab1878f3db8943e7 100644 (file)
@@ -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;
 }
index b58a408a028dce1b98740ec7d1b8798e1ca7d04f..455b4ff2d211440c18f464009f9225e224ba0d9b 100644 (file)
@@ -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;
 }
index e02acadab39f06eba3909b8af548a99dc8920242..476da71f16b8c78b5a5cb23f2ea94bc3366d2500 100644 (file)
@@ -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;
 }
index b42743845d62be52cb2e1c72872216533de30d37..dc89a52f004aff0319a3d88358030d105a1fc508 100644 (file)
@@ -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;
 }
index a216aa13a38e7bc922af4e54b65c5f01edfa558c..079fc578dfda3137f9518968eb6881e559b9b552 100644 (file)
@@ -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;
 }
index d096082143ac08ba838b563b6cea5431fbfe3e96..59ca50c556319f6e1f39bf09d1c433a80d8bd6be 100644 (file)
@@ -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;
 }
index d749e67d27c70e7c92cf5c59feb6c22da4a6ff3b..0d3c4199869368ad751c8a302d3750f1c4dd406a 100644 (file)
@@ -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;
 }
index 0a7684abe454a2d0c54519b8be5cef932edfe984..784e17f0275854599160ce23c48861a37a29cfb7 100644 (file)
@@ -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;
 }
index eea153742f03a5783551fea1d309ddfdefab34aa..d606fa0694190bb6ddc7b6c96212c67e5b779888 100644 (file)
@@ -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;
 }
index 8447706958e0556b3d5b8094df8a55b461bd6f93..4cce921c5b7dd4e9944a29e06adb4b0b36c746a6 100644 (file)
@@ -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 */
 }
index 37afec4f5a45e15616ecbf2637f425a0bfabf8a1..47298355993458db8b46b67fc5f10d1b3b1c629e 100644 (file)
@@ -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;
 }
index 3a8e0df434734bbecbf5d81d55a1f7dbbd1585da..3fc58fe7b1b05e9e4160d7d4ff7fb22deb82ea84 100644 (file)
@@ -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;
 }
index edcb26333822c04c1d6ffdde607db24d4a4bfb74..3d9b4575d4600292644307ba6d499ea25ddd22a8 100644 (file)
@@ -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;
 }
index 5071e7fa267d6118c407a72abc1336502529e4e3..d1a78e206dbf6c09b279210ce990e3daabb1e297 100644 (file)
@@ -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;
 }
index 7cf6d091339bb3e04aea7d1cd025913686674ae5..12cb4b7250fde8989d117b0ba42972599bf70179 100644 (file)
@@ -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;
 }
index e0a36412b012e5276845d8b864fa5289c1bac310..5a5d644cec41295be2d4d28f9cb329e25042653c 100644 (file)
@@ -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;
 }
index 3d835d500f868aaf31e5355dc95f8d1f45174af0..c0b383d0ac214785899dbe1a7c139414a7a89b91 100644 (file)
@@ -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;
 }
index e0f291d809e292b6fceebec5744e79a445850170..ae0f524e4799b54d96321b0d6031f0428cba0780 100644 (file)
@@ -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;
 }
index 08dd7cfa08f977ab544fba03a8596d2e516e553d..60e4f7ef25c404e9cd5e1849639babcdbf5d8b91 100644 (file)
@@ -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;
 }
index c84d1af05db856ff84910c501173170c6287d1f9..11fb8be84922f9cf488bb1604218bbd113cf0fe1 100644 (file)
@@ -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;
 }
index 17494b73e7de7e6f2203800842dd4990a6cbd832..0f7fc735f9b46a00ed45cab264cfc88a02573dad 100644 (file)
@@ -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;
 }
index 089202b5c59141fb3baddb4098c40144593b9df0..fdb7294caaa0dc0f2191d0ef0579645f18e114d0 100644 (file)
@@ -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;
 }
index 3214694c7ddfbab733775dd67b11c536e2a957da..0077decd2c2e575630b45ce52e4ed07168ed5de3 100644 (file)
@@ -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;
 }
index 25db2694c6d7f063bc32016aef874b06a862c802..83d5e8f4169f948b4f85c7f4dd631bd9e71df9ae 100644 (file)
@@ -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;
 }
index 1177a529fd6497e35688ccff5c3c33030abb500b..90a658c598f16510650aaee7236702f9425afa2e 100644 (file)
@@ -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;
 }
index 898ba8d7efcb0ec598869358f62fb503e2174169..cc140144162eeb1233a9f881e7aff4227d61d98e 100644 (file)
@@ -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;
 }
index f01fa3f5c8061b83a5273c56b12b7d20838ecfd2..a83f4c6b40ac7bb52a40c71d4a0db2027f56dba9 100644 (file)
@@ -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;
 }
index f3a1e0fdb408cc178c81206174c02811e6a82065..b3237becf95fa7ce513ab173c7c9443c22439532 100644 (file)
@@ -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;
 }
index 37bc3b0e62ec99f0df78d92f238b6595cb16ffeb..9fcdaad2a05f3bba59da442aa5c6ffb723670e45 100644 (file)
@@ -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)
index bba08e263b84e515fa5b001ddde134b41a85ff18..b3bf62ea521486d190c28dfc0891967241864970 100644 (file)
@@ -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;
 }
index 77e10a05d90f6a8f70b64cc7b82e862603f5a666..a926049014a573a1dbacc5a58c7cfdb96eb91d7d 100755 (executable)
@@ -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
     ;
index 1c3f0cc639f7f1cfad32cab014c9411426c56440..5bdb3f70036db3d884ab49f551e0721ab8bad2f7 100644 (file)
@@ -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)
index fd58c03b800406086678e1583dd0e97f4807ed7f..33317c73e8161e11f9e3911012a7695dd115282c 100644 (file)
@@ -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)
index 20a299af7370d334ff3af7465fc1e06ffbb3f123..ce99379d6bb6569f293b66d3dc5cdcf8eb774a4f 100644 (file)
@@ -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)
index 8b1ec447caeec960cbc262f1862e748e3b59bf0c..d634f0d6dffed14a9a420a3cedb35ccb2f1b577c 100644 (file)
@@ -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)
index 03126a74789f85593a51e3a9aa21b01d03c4399e..e8a09344a113563adb0b7cf9478b5126789d9063 100644 (file)
@@ -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;
index c23a59fa54dba3b3c488d54861f71e87ce900956..202cc3b9c6c53fb0783a96414d5bb9b71982c6d5 100644 (file)
@@ -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)
index b1eac34923dcd9559c4a0565b37954f9820462be..16d2e7dc49e5c1ba20d66eac6a0498c89851dfd6 100644 (file)
@@ -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:
index ba64a15a960343a3c7ac32eba317826f17617c6b..346b0a5494694ab9327c847c08577a223a616f09 100644 (file)
@@ -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)
index e6070ad157d4728efd331873ee6e06ec7109634e..50fbe64a36ab26e3e735a1a09a08631341799e7b 100644 (file)
@@ -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,
index d90dea36d4ae4f9be32ba392b684bda215f596a4..aa4de802d6f26cd34b108c3ac78359a982d3550d 100644 (file)
@@ -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)
index d60fa96b8fd0415ee0c7b035de55479cf198cbc9..db97c48aed2ec36c0a3c49d02f1ef55a668ccd67 100644 (file)
@@ -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)) {
index 7f8d1aa76a374377a06823cfe3b0823971c3427a..b4c1693e9dc92214a7df7902e9ff7cc5686a6e46 100644 (file)
@@ -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);
index e0c77c9d7849924d39f9ff56ce7a44a679aa600e..4e6289ae661c173448bb53059d9d4395c16ca30f 100644 (file)
@@ -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,
index a24a859e5272e09bbaa67858b834571448dc7d0e..25b99502575490b0c8070b6f1cd370e1d0d2e712 100644 (file)
@@ -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)
index 9af844ca63876a4f17de488026ae205bb4b4b7b9..34cf3a2ae7da548760b268c0622559cd57498895 100644 (file)
@@ -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);
index 2e61efc0a5f43ded72f5dbdc5bbe902646fb4f10..843886e7c8a1a1ab08bb0507169e41899a522adc 100644 (file)
@@ -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);