aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/multi-double.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/multi-double.c')
-rw-r--r--docs/examples/multi-double.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c
index 343453939..79e44ca88 100644
--- a/docs/examples/multi-double.c
+++ b/docs/examples/multi-double.c
@@ -42,7 +42,7 @@ int main(void)
CURL *http_handle2;
CURLM *multi_handle;
- int still_running; /* keep number of running handles */
+ int still_running = 0; /* keep number of running handles */
http_handle = curl_easy_init();
http_handle2 = curl_easy_init();
@@ -63,7 +63,7 @@ int main(void)
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
- do {
+ while(still_running) {
struct timeval timeout;
int rc; /* select() return code */
CURLMcode mc; /* curl_multi_fdset() return code */
@@ -132,7 +132,7 @@ int main(void)
curl_multi_perform(multi_handle, &still_running);
break;
}
- } while(still_running);
+ }
curl_multi_cleanup(multi_handle);