Loading docs/examples/cacertinmem.c +1 −2 Original line number Diff line number Diff line Loading @@ -85,7 +85,6 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) BIO *cbio = BIO_new_mem_buf(mypem, sizeof(mypem)); X509_STORE *cts = SSL_CTX_get_cert_store((SSL_CTX *)sslctx); X509_INFO *itmp; int i; STACK_OF(X509_INFO) *inf; (void)curl; Loading @@ -103,7 +102,7 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) } for(i = 0; i < sk_X509_INFO_num(inf); i++) { itmp = sk_X509_INFO_value(inf, i); X509_INFO *itmp = sk_X509_INFO_value(inf, i); if(itmp->x509) { X509_STORE_add_cert(cts, itmp->x509); } Loading docs/examples/curlgtk.c +2 −3 Original line number Diff line number Diff line Loading @@ -45,13 +45,12 @@ int my_progress_func(GtkWidget *bar, void *my_thread(void *ptr) { CURL *curl; FILE *outfile; gchar *url = ptr; curl = curl_easy_init(); if(curl) { gchar *url = ptr; const char *filename = "test.curl"; outfile = fopen(filename, "wb"); FILE *outfile = fopen(filename, "wb"); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile); Loading docs/examples/ephiperfifo.c +3 −4 Original line number Diff line number Diff line Loading @@ -472,8 +472,6 @@ void SignalHandler(int signo) int main(int argc _Unused, char **argv _Unused) { GlobalInfo g; int err; int idx; struct itimerspec its; struct epoll_event ev; struct epoll_event events[10]; Loading Loading @@ -518,8 +516,9 @@ int main(int argc _Unused, char **argv _Unused) fprintf(MSG_OUT, "Entering wait loop\n"); fflush(MSG_OUT); while(!g_should_exit_) { err = epoll_wait(g.epfd, events, sizeof(events)/sizeof(struct epoll_event), 10000); int idx; int err = epoll_wait(g.epfd, events, sizeof(events)/sizeof(struct epoll_event), 10000); if(err == -1) { if(errno == EINTR) { fprintf(MSG_OUT, "note: wait interrupted\n"); Loading docs/examples/htmltidy.c +7 −6 Original line number Diff line number Diff line Loading @@ -74,13 +74,14 @@ void dumpNode(TidyDoc doc, TidyNode tnod, int indent) int main(int argc, char **argv) { if(argc == 2) { CURL *curl; char curl_errbuf[CURL_ERROR_SIZE]; TidyDoc tdoc; TidyBuffer docbuf = {0}; TidyBuffer tidy_errbuf = {0}; int err; if(argc == 2) { curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, argv[1]); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_errbuf); Loading docs/examples/imap-append.c +6 −5 Original line number Diff line number Diff line Loading @@ -85,14 +85,15 @@ int main(void) { CURL *curl; CURLcode res = CURLE_OK; curl = curl_easy_init(); if(curl) { const char **p; long infilesize; struct upload_status upload_ctx; upload_ctx.lines_read = 0; curl = curl_easy_init(); if(curl) { /* Set username and password */ curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); Loading Loading
docs/examples/cacertinmem.c +1 −2 Original line number Diff line number Diff line Loading @@ -85,7 +85,6 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) BIO *cbio = BIO_new_mem_buf(mypem, sizeof(mypem)); X509_STORE *cts = SSL_CTX_get_cert_store((SSL_CTX *)sslctx); X509_INFO *itmp; int i; STACK_OF(X509_INFO) *inf; (void)curl; Loading @@ -103,7 +102,7 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) } for(i = 0; i < sk_X509_INFO_num(inf); i++) { itmp = sk_X509_INFO_value(inf, i); X509_INFO *itmp = sk_X509_INFO_value(inf, i); if(itmp->x509) { X509_STORE_add_cert(cts, itmp->x509); } Loading
docs/examples/curlgtk.c +2 −3 Original line number Diff line number Diff line Loading @@ -45,13 +45,12 @@ int my_progress_func(GtkWidget *bar, void *my_thread(void *ptr) { CURL *curl; FILE *outfile; gchar *url = ptr; curl = curl_easy_init(); if(curl) { gchar *url = ptr; const char *filename = "test.curl"; outfile = fopen(filename, "wb"); FILE *outfile = fopen(filename, "wb"); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile); Loading
docs/examples/ephiperfifo.c +3 −4 Original line number Diff line number Diff line Loading @@ -472,8 +472,6 @@ void SignalHandler(int signo) int main(int argc _Unused, char **argv _Unused) { GlobalInfo g; int err; int idx; struct itimerspec its; struct epoll_event ev; struct epoll_event events[10]; Loading Loading @@ -518,8 +516,9 @@ int main(int argc _Unused, char **argv _Unused) fprintf(MSG_OUT, "Entering wait loop\n"); fflush(MSG_OUT); while(!g_should_exit_) { err = epoll_wait(g.epfd, events, sizeof(events)/sizeof(struct epoll_event), 10000); int idx; int err = epoll_wait(g.epfd, events, sizeof(events)/sizeof(struct epoll_event), 10000); if(err == -1) { if(errno == EINTR) { fprintf(MSG_OUT, "note: wait interrupted\n"); Loading
docs/examples/htmltidy.c +7 −6 Original line number Diff line number Diff line Loading @@ -74,13 +74,14 @@ void dumpNode(TidyDoc doc, TidyNode tnod, int indent) int main(int argc, char **argv) { if(argc == 2) { CURL *curl; char curl_errbuf[CURL_ERROR_SIZE]; TidyDoc tdoc; TidyBuffer docbuf = {0}; TidyBuffer tidy_errbuf = {0}; int err; if(argc == 2) { curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, argv[1]); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_errbuf); Loading
docs/examples/imap-append.c +6 −5 Original line number Diff line number Diff line Loading @@ -85,14 +85,15 @@ int main(void) { CURL *curl; CURLcode res = CURLE_OK; curl = curl_easy_init(); if(curl) { const char **p; long infilesize; struct upload_status upload_ctx; upload_ctx.lines_read = 0; curl = curl_easy_init(); if(curl) { /* Set username and password */ curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); Loading