]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
libtest: fix build errors
authorDaniel Stenberg <daniel@haxx.se>
Tue, 8 Sep 2020 15:37:25 +0000 (17:37 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 8 Sep 2020 15:37:25 +0000 (17:37 +0200)
Follow-up from 17fcdf6a310d4c8076

tests/libtest/lib1592.c
tests/libtest/lib583.c

index ce0892be2f62a9116cfdb2d50da3fe3835d81774..34901d20ec66ba45454d8127b97343e2261dd712 100644 (file)
@@ -44,6 +44,7 @@ int test(char *URL)
   CURLM *multiHandle = NULL;
   CURL *curl = NULL;
   CURLcode res = CURLE_OK;
+  CURLMcode mres;
   int timeout;
 
   global_init(CURL_GLOBAL_ALL);
@@ -97,10 +98,11 @@ int test(char *URL)
   /* Start measuring how long it takes to remove the handle. */
   fprintf(stderr, "curl_multi_remove_handle()...\n");
   start_test_timing();
-  res = curl_multi_remove_handle(multiHandle, curl);
-  if(res) {
+  mres = curl_multi_remove_handle(multiHandle, curl);
+  if(mres) {
     fprintf(stderr, "curl_multi_remove_handle() failed, "
             "with code %d\n", (int)res);
+    res = TEST_ERR_MULTI;
     goto test_cleanup;
   }
   fprintf(stderr, "curl_multi_remove_handle() succeeded\n");
index 3e2fe386772bb0377d740bb6facd63b130704d44..4c667ce9b2356343903da66c9c5de6b979e8c7ef 100644 (file)
@@ -36,6 +36,7 @@ int test(char *URL)
   CURLM *multiHandle = NULL;
   CURL *curl = NULL;
   CURLcode res = CURLE_OK;
+  CURLMcode mres = CURLE_OK;
 
   global_init(CURL_GLOBAL_ALL);
 
@@ -65,10 +66,12 @@ int test(char *URL)
   fprintf(stderr, "curl_multi_perform() succeeded\n");
 
   fprintf(stderr, "curl_multi_remove_handle()...\n");
-  res = curl_multi_remove_handle(multiHandle, curl);
-  if(res)
+  mres = curl_multi_remove_handle(multiHandle, curl);
+  if(mres) {
     fprintf(stderr, "curl_multi_remove_handle() failed, "
-            "with code %d\n", (int)res);
+            "with code %d\n", (int)mres);
+    res = TEST_ERR_MULTI;
+  }
   else
     fprintf(stderr, "curl_multi_remove_handle() succeeded\n");