tidy-up: result code variable names in tests and examples

Sync outliers with the rest of the code.

Also:
- return error in some failed init cases, instead of `CURLE_OK`:
  1908, 1910, 1913, 2082, 3010
- lib1541: delete unused struct member.

Closes #19515
This commit is contained in:
Viktor Szakats 2025-11-13 20:31:51 +01:00
parent e3e0559ed2
commit 96500f466e
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
40 changed files with 342 additions and 348 deletions

View file

@ -411,7 +411,7 @@ static void test_ws_data_usage(const char *msg)
static CURLcode test_cli_ws_data(const char *URL)
{
#ifndef CURL_DISABLE_WEBSOCKETS
CURLcode result = CURLE_OK;
CURLcode res = CURLE_OK;
const char *url;
size_t plen_min = 0, plen_max = 0, count = 1;
int ch, model = 2;
@ -472,13 +472,13 @@ static CURLcode test_cli_ws_data(const char *URL)
}
if(model == 1)
result = test_ws_data_m1_echo(url, plen_min, plen_max);
res = test_ws_data_m1_echo(url, plen_min, plen_max);
else
result = test_ws_data_m2_echo(url, count, plen_min, plen_max);
res = test_ws_data_m2_echo(url, count, plen_min, plen_max);
curl_global_cleanup();
return result;
return res;
#else /* !CURL_DISABLE_WEBSOCKETS */
(void)URL;