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

@ -109,7 +109,7 @@ static CURLcode test_cli_h2_serverpush(const char *URL)
CURL *curl = NULL;
CURLM *multi;
int transfers = 1; /* we start with one */
CURLcode result = CURLE_OK;
CURLcode res = CURLE_OK;
debug_config.nohex = TRUE;
debug_config.tracetime = FALSE;
@ -126,19 +126,19 @@ static CURLcode test_cli_h2_serverpush(const char *URL)
multi = curl_multi_init();
if(!multi) {
result = (CURLcode)1;
res = (CURLcode)1;
goto cleanup;
}
curl = curl_easy_init();
if(!curl) {
result = (CURLcode)1;
res = (CURLcode)1;
goto cleanup;
}
if(setup_h2_serverpush(curl, URL)) {
curl_mfprintf(stderr, "failed\n");
result = (CURLcode)1;
res = (CURLcode)1;
goto cleanup;
}
@ -189,5 +189,5 @@ cleanup:
curl_global_cleanup();
return result;
return res;
}