mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:21:41 +03:00
docs: compare result against literal CURLE_OK (where missing)
Also scope to result variables. Closes #20536
This commit is contained in:
parent
85de995208
commit
02c37d269c
164 changed files with 203 additions and 203 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue