tests: rename more CURLcode variables to result

For consistency.

Also:
- one remaining in `src/tool_writeout.c`.
- replace casting an `int` to `CURLcode`.
- lib758: rename `CURLMcode` `result` to `mresult`.
- move literals to the right side of if expressions.

Follow-up to d0dc6e2ec0 #20426
Follow-up to 56f600ec23

Closes #20432
This commit is contained in:
Viktor Szakats 2026-01-25 18:12:40 +01:00
parent 26c39d8df1
commit 2da1bbca96
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
33 changed files with 307 additions and 303 deletions

View file

@ -83,7 +83,7 @@ struct test_case {
int exp_cf6_creations;
timediff_t min_duration_ms;
timediff_t max_duration_ms;
CURLcode exp_res;
CURLcode result_exp;
const char *pref_family;
};
@ -242,11 +242,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->result != tc->exp_res && CURLE_OPERATION_TIMEDOUT != tr->result) {
if(tr->result != tc->result_exp && 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->result);
tc->id, tc->result_exp, tr->result);
fail(msg);
}
if(tr->cf4.creations != tc->exp_cf4_creations) {