mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:03:31 +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
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
static CURLcode test_lib3027(const char *URL)
|
||||
{
|
||||
CURLcode ret = CURLE_OK;
|
||||
CURLcode result = CURLE_OK;
|
||||
CURL *curl;
|
||||
start_test_timing();
|
||||
|
||||
|
|
@ -35,18 +35,18 @@ static CURLcode test_lib3027(const char *URL)
|
|||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, URL);
|
||||
curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
|
||||
ret = curl_easy_perform(curl);
|
||||
if(CURLE_OK == ret) {
|
||||
result = curl_easy_perform(curl);
|
||||
if(result == CURLE_OK) {
|
||||
long filetime;
|
||||
ret = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
|
||||
result = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
|
||||
/* MTDM fails with 550, so filetime should be -1 */
|
||||
if((CURLE_OK == ret) && (filetime != -1)) {
|
||||
if((result == CURLE_OK) && (filetime != -1)) {
|
||||
/* we just need to return something which is not CURLE_OK */
|
||||
ret = CURLE_UNSUPPORTED_PROTOCOL;
|
||||
result = CURLE_UNSUPPORTED_PROTOCOL;
|
||||
}
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
curl_global_cleanup();
|
||||
return ret;
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue