docs: rename CURLcode variables to 'result'

This commit is contained in:
Daniel Stenberg 2025-12-16 15:54:06 +01:00
parent d21f4372ff
commit 09f01f28ec
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
381 changed files with 1705 additions and 1695 deletions

View file

@ -77,7 +77,7 @@ static int upload(CURL *curl, const char *remotepath,
{
FILE *f;
long uploaded_len = 0;
CURLcode res = CURLE_GOT_NOTHING;
CURLcode result = CURLE_GOT_NOTHING;
int c;
f = fopen(localpath, "rb");
@ -111,7 +111,7 @@ static int upload(CURL *curl, const char *remotepath,
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
for(c = 0; (res != CURLE_OK) && (c < tries); c++) {
for(c = 0; (result != CURLE_OK) && (c < tries); c++) {
/* are we resuming? */
if(c) { /* yes */
/* determine the length of the file already written */
@ -125,8 +125,8 @@ static int upload(CURL *curl, const char *remotepath,
curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
res = curl_easy_perform(curl);
if(res != CURLE_OK)
result = curl_easy_perform(curl);
if(result != CURLE_OK)
continue;
curl_easy_setopt(curl, CURLOPT_NOBODY, 0L);
@ -140,15 +140,15 @@ static int upload(CURL *curl, const char *remotepath,
curl_easy_setopt(curl, CURLOPT_APPEND, 0L);
}
res = curl_easy_perform(curl);
result = curl_easy_perform(curl);
}
fclose(f);
if(res == CURLE_OK)
if(result == CURLE_OK)
return 1;
else {
fprintf(stderr, "%s\n", curl_easy_strerror(res));
fprintf(stderr, "%s\n", curl_easy_strerror(result));
return 0;
}
}
@ -157,9 +157,9 @@ int main(void)
{
CURL *curl = NULL;
CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
if(res)
return (int)res;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
return (int)result;
curl = curl_easy_init();
if(curl) {