mirror of
https://github.com/curl/curl.git
synced 2026-08-25 06:03:32 +03:00
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 tod0dc6e2ec0#20426 Follow-up to56f600ec23Closes #20432
This commit is contained in:
parent
26c39d8df1
commit
2da1bbca96
33 changed files with 307 additions and 303 deletions
|
|
@ -42,7 +42,7 @@ static CURLcode test_lib3026(const char *URL)
|
|||
CURLcode results[NUM_THREADS];
|
||||
HANDLE thread_handles[NUM_THREADS];
|
||||
unsigned tid_count = NUM_THREADS, i;
|
||||
CURLcode test_failure = CURLE_OK;
|
||||
CURLcode result = CURLE_OK;
|
||||
curl_version_info_data *ver;
|
||||
(void)URL;
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ static CURLcode test_lib3026(const char *URL)
|
|||
"GetLastError 0x%08lx\n",
|
||||
__FILE__, __LINE__, GetLastError());
|
||||
tid_count = i;
|
||||
test_failure = TEST_ERR_MAJOR_BAD;
|
||||
result = TEST_ERR_MAJOR_BAD;
|
||||
goto cleanup;
|
||||
}
|
||||
thread_handles[i] = th;
|
||||
|
|
@ -77,11 +77,11 @@ cleanup:
|
|||
curl_mfprintf(stderr, "%s:%d thread[%u]: curl_global_init() failed,"
|
||||
"with code %d (%s)\n", __FILE__, __LINE__,
|
||||
i, results[i], curl_easy_strerror(results[i]));
|
||||
test_failure = TEST_ERR_MAJOR_BAD;
|
||||
result = TEST_ERR_MAJOR_BAD;
|
||||
}
|
||||
}
|
||||
|
||||
return test_failure;
|
||||
return result;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_PTHREAD_H)
|
||||
|
|
@ -103,7 +103,7 @@ static CURLcode test_lib3026(const char *URL)
|
|||
CURLcode results[NUM_THREADS];
|
||||
pthread_t tids[NUM_THREADS];
|
||||
unsigned tid_count = NUM_THREADS, i;
|
||||
CURLcode test_failure = CURLE_OK;
|
||||
CURLcode result = CURLE_OK;
|
||||
curl_version_info_data *ver;
|
||||
(void)URL;
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ static CURLcode test_lib3026(const char *URL)
|
|||
curl_mfprintf(stderr, "%s:%d Could not create thread, errno %d\n",
|
||||
__FILE__, __LINE__, res);
|
||||
tid_count = i;
|
||||
test_failure = TEST_ERR_MAJOR_BAD;
|
||||
result = TEST_ERR_MAJOR_BAD;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
|
@ -135,11 +135,11 @@ cleanup:
|
|||
curl_mfprintf(stderr, "%s:%d thread[%u]: curl_global_init() failed,"
|
||||
"with code %d (%s)\n", __FILE__, __LINE__,
|
||||
i, results[i], curl_easy_strerror(results[i]));
|
||||
test_failure = TEST_ERR_MAJOR_BAD;
|
||||
result = TEST_ERR_MAJOR_BAD;
|
||||
}
|
||||
}
|
||||
|
||||
return test_failure;
|
||||
return result;
|
||||
}
|
||||
|
||||
#else /* without pthread or Windows, this test does not work */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue