aboutsummaryrefslogtreecommitdiffstats
path: root/docs/examples/multi-single.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/multi-single.c')
-rw-r--r--docs/examples/multi-single.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c
index 70b6d24b..530a5f50 100644
--- a/docs/examples/multi-single.c
+++ b/docs/examples/multi-single.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -51,7 +51,7 @@ int main(void)
CURL *http_handle;
CURLM *multi_handle;
- int still_running; /* keep number of running handles */
+ int still_running = 0; /* keep number of running handles */
int repeats = 0;
curl_global_init(CURL_GLOBAL_DEFAULT);
@@ -59,7 +59,7 @@ int main(void)
http_handle = curl_easy_init();
/* set the options (I left out a few, you'll get the point anyway) */
- curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
+ curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/");
/* init a multi stack */
multi_handle = curl_multi_init();
@@ -70,7 +70,7 @@ int main(void)
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
- do {
+ while(still_running) {
CURLMcode mc; /* curl_multi_wait() return code */
int numfds;
@@ -97,7 +97,7 @@ int main(void)
repeats = 0;
curl_multi_perform(multi_handle, &still_running);
- } while(still_running);
+ }
curl_multi_remove_handle(multi_handle, http_handle);