]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib1514: fix return code mixup
authorDaniel Stenberg <daniel@haxx.se>
Sat, 11 Oct 2025 21:34:45 +0000 (23:34 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 12 Oct 2025 08:36:18 +0000 (10:36 +0200)
Reported-by: Joshua Rogers
Closes #19027

tests/libtest/lib1514.c

index 265f47af08d380e304a701e1e6a667550a01555f..fc7e33e3d3b35b4657a406693c509cc319d8a3e8 100644 (file)
@@ -55,7 +55,6 @@ 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 result = CURLE_OK;
   CURLcode res = CURLE_OK;
 
   static char testdata[] = "dummy";
@@ -77,12 +76,12 @@ static CURLcode test_lib1514(const char *URL)
     easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
   }
 
-  result = curl_easy_perform(curl);
+  res = curl_easy_perform(curl);
 
 test_cleanup:
 
   curl_easy_cleanup(curl);
   curl_global_cleanup();
 
-  return result;
+  return res;
 }