aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib560.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-10 12:29:32 +0000
committerYang Tse <yangsita@gmail.com>2009-10-10 12:29:32 +0000
commit640e49976f34d766124cb6988dc4849c4acab6d0 (patch)
tree78d4ae77225e32e08a33cea945ec244adb67ef96 /tests/libtest/lib560.c
parentf1aa936d2c48a5a4cd860d22b8db566a1dd848b2 (diff)
Fix compiler warning: loop without body
Diffstat (limited to 'tests/libtest/lib560.c')
-rw-r--r--tests/libtest/lib560.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c
index d2de7bfb4..3e34cf788 100644
--- a/tests/libtest/lib560.c
+++ b/tests/libtest/lib560.c
@@ -24,6 +24,7 @@ int test(char *URL)
{
CURL *http_handle;
CURLM *multi_handle;
+ CURLMcode code;
int still_running; /* keep number of running handles */
@@ -48,8 +49,9 @@ int test(char *URL)
curl_multi_add_handle(multi_handle, http_handle);
/* we start some action by calling perform right away */
- while(CURLM_CALL_MULTI_PERFORM ==
- curl_multi_perform(multi_handle, &still_running));
+ do {
+ code = curl_multi_perform(multi_handle, &still_running);
+ } while(code == CURLM_CALL_MULTI_PERFORM);
while(still_running) {
struct timeval timeout;
@@ -84,8 +86,9 @@ int test(char *URL)
case 0:
default:
/* timeout or readable/writable sockets */
- while(CURLM_CALL_MULTI_PERFORM ==
- curl_multi_perform(multi_handle, &still_running));
+ do {
+ code = curl_multi_perform(multi_handle, &still_running);
+ } while(code == CURLM_CALL_MULTI_PERFORM);
break;
}
}