docs: compare result against literal CURLE_OK (where missing)

Also scope to result variables.

Closes #20536
This commit is contained in:
Viktor Szakats 2026-02-07 16:50:54 +01:00
parent 85de995208
commit 02c37d269c
No known key found for this signature in database
164 changed files with 203 additions and 203 deletions

View file

@ -107,7 +107,7 @@ int main(void)
CURLM *multi;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
multi = curl_multi_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -116,7 +116,7 @@ int main(int argc, const char **argv)
/* In Windows, this inits the Winsock stuff */
result = curl_global_init(CURL_GLOBAL_ALL);
if(result) {
if(result != CURLE_OK) {
fclose(fp);
return (int)result;
}

View file

@ -296,7 +296,7 @@ int main(void)
return 1;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result) {
if(result != CURLE_OK) {
free(filter);
return (int)result;
}

View file

@ -119,7 +119,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -42,7 +42,7 @@ int main(void)
CURLcode result;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();
@ -59,7 +59,7 @@ int main(void)
result = curl_easy_perform(curl);
if(!result) {
if(result == CURLE_OK) {
struct curl_certinfo *certinfo;
result = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &certinfo);

View file

@ -162,7 +162,7 @@ int main(int argc, const char *argv[])
/* init libcurl */
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* init the curl session */

View file

@ -35,7 +35,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/*

View file

@ -77,7 +77,7 @@ int main(void)
CURLcode result;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -186,7 +186,7 @@ int main(void)
CURLcode result;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
signal(SIGINT, sighandler);

View file

@ -125,7 +125,7 @@ int main(void)
struct data config;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
config.trace_ascii = 1; /* enable ASCII tracing */

View file

@ -35,7 +35,7 @@ int main(void)
CURLcode result;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -464,7 +464,7 @@ int main(void)
struct epoll_event events[10];
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
g_should_exit_ = 0;

View file

@ -413,7 +413,7 @@ int main(void)
struct GlobalInfo g;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
memset(&g, 0, sizeof(g));

View file

@ -104,7 +104,7 @@ int main(void)
curl_socket_t sockfd;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();
@ -163,7 +163,7 @@ int main(void)
close(sockfd);
if(result) {
if(result != CURLE_OK) {
printf("libcurl error: %d\n", result);
return 4;
}

View file

@ -54,7 +54,7 @@ int main(void)
FILE *fd;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
fd = fopen("debugit", "rb"); /* open file to upload */

View file

@ -43,7 +43,7 @@ int main(void)
struct curl_slist *headerlist = NULL;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -107,7 +107,7 @@ int main(int argc, const char **argv)
/* global initialization */
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* initialization of easy handle */

View file

@ -62,7 +62,7 @@ int main(void)
};
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -56,7 +56,7 @@ int main(void)
const char *filename = strrchr(ftpurl, '/') + 1;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -53,7 +53,7 @@ int main(void)
FILE *respfile;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* local filename to store the file as */

View file

@ -62,7 +62,7 @@ int main(void)
};
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -107,7 +107,7 @@ int main(void)
/* In Windows, this inits the Winsock stuff */
result = curl_global_init(CURL_GLOBAL_ALL);
if(result) {
if(result != CURLE_OK) {
fclose(hd_src);
return (int)result;
}

View file

@ -158,7 +158,7 @@ int main(void)
CURL *curl = NULL;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -65,7 +65,7 @@ int main(void)
struct MemoryStruct chunk;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
chunk.memory = malloc(1); /* grown as needed by the realloc above */

View file

@ -35,7 +35,7 @@ int main(void)
CURLcode result;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -432,7 +432,7 @@ int main(void)
GIOChannel *ch;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
fd = init_fifo();

View file

@ -42,7 +42,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -422,7 +422,7 @@ int main(void)
struct GlobalInfo g;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
memset(&g, 0, sizeof(g));

View file

@ -92,7 +92,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -89,7 +89,7 @@ int main(int argc, const char **argv)
}
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
tdoc = tidyCreate();
@ -108,7 +108,7 @@ int main(int argc, const char **argv)
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &docbuf);
result = curl_easy_perform(curl);
if(!result) {
if(result == CURLE_OK) {
result = tidyParseBuffer(tdoc, &docbuf); /* parse the input */
if(result >= 0) {
result = tidyCleanAndRepair(tdoc); /* fix any problems */

View file

@ -264,7 +264,7 @@ int main(int argc, const char *argv[])
}
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
// Initialize CURL handle

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -36,7 +36,7 @@ int main(void)
/* In Windows, this inits the Winsock stuff */
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* get a curl handle */

View file

@ -206,7 +206,7 @@ int main(int argc, const char **argv)
num_transfers = 3; /* a suitable low default */
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
trans = calloc(num_transfers, sizeof(*trans));

View file

@ -126,7 +126,7 @@ int main(void)
int i;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* init a multi stack */

View file

@ -226,7 +226,7 @@ int main(int argc, const char *argv[])
url = argv[1];
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* init a multi stack */

View file

@ -309,7 +309,7 @@ int main(int argc, const char **argv)
num_transfers = 3; /* a suitable low default */
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
trans = calloc(num_transfers, sizeof(*trans));

View file

@ -34,7 +34,7 @@ int main(void)
curl_version_info_data *ver;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
ver = curl_version_info(CURLVERSION_NOW);

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -60,7 +60,7 @@ int main(int argc, const char **argv)
/* In Windows, this inits the Winsock stuff */
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* get a curl handle */

View file

@ -104,7 +104,7 @@ int main(int argc, const char **argv)
/* In Windows, this inits the Winsock stuff */
result = curl_global_init(CURL_GLOBAL_ALL);
if(result) {
if(result != CURLE_OK) {
fclose(hd_src);
return (int)result;
}

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -88,7 +88,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -41,7 +41,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -41,7 +41,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -225,7 +225,7 @@ int main(void)
transfer[1].logfile = "400_transfer_log.txt";
result = curl_global_init(CURL_GLOBAL_ALL);
if(result) {
if(result != CURLE_OK) {
fprintf(stderr, "curl_global_init failed\n");
return (int)result;
}

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -47,7 +47,7 @@ int main(void)
int i;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* Allocate one curl handle per transfer */

View file

@ -118,7 +118,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -39,7 +39,7 @@ int main(void)
CURL *curl2;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -221,7 +221,7 @@ int main(int argc, const char **argv)
return 0;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result) {
if(result != CURLE_OK) {
fprintf(stderr, "Could not init curl\n");
return (int)result;
}

View file

@ -44,7 +44,7 @@ int main(void)
static const char buf[] = "Expect:";
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
CURL_IGNORE_DEPRECATION(

View file

@ -53,7 +53,7 @@ int main(void)
int i;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* Allocate one curl handle per transfer */

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -39,7 +39,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -237,7 +237,7 @@ int main(int argc, const char **argv)
return 0;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
uv.loop = uv_default_loop();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -41,7 +41,7 @@ int main(void)
CURL *curl;
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -41,7 +41,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -41,7 +41,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -40,7 +40,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -64,7 +64,7 @@ int main(void)
static const char *postthis = "Field=1&Field=2&Field=3";
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
chunk.memory = malloc(1); /* grown as needed by realloc above */

View file

@ -56,7 +56,7 @@ int main(int argc, const char *argv[])
static const char buf[] = "Expect:";
result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
CURL_IGNORE_DEPRECATION(

View file

@ -47,7 +47,7 @@ int main(int argc, const char *argv[])
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -78,7 +78,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -39,7 +39,7 @@ int main(void)
const char * const *ptr;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
ver = curl_version_info(CURLVERSION_NOW);

View file

@ -32,7 +32,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -43,7 +43,7 @@ int main(void)
"example.com:443:127.0.0.1");
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -34,7 +34,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
curl = curl_easy_init();

View file

@ -81,7 +81,7 @@ int main(void)
size_t request_len = strlen(request);
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* A general note of caution here: if you are using curl_easy_recv() or

View file

@ -47,7 +47,7 @@ int main(void)
CURL *curl;
CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
if(result)
if(result != CURLE_OK)
return (int)result;
/* init the curl session */

Some files were not shown because too many files have changed in this diff Show more