diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2017-07-16 13:44:54 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2017-07-16 14:02:59 +0200 |
commit | fb3b0f25ef9b20b40e48d2a507968a975ef09bb9 (patch) | |
tree | a471bd461f3e95b5617323e50b67564cad1d2901 /tests/libtest/lib1515.c | |
parent | 0bdb81125008207c9be90c69ec9393061eaab10b (diff) | |
download | curl-fb3b0f25ef9b20b40e48d2a507968a975ef09bb9.tar.gz |
libtest: fix MSVC warning C4706
With warning level 4, MSVC warns about assignments within conditional
expressions. Change the while loop to a do-while loop to fix this. This
change is also consistent with CODE_STYLE.md.
Diffstat (limited to 'tests/libtest/lib1515.c')
-rw-r--r-- | tests/libtest/lib1515.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c index 7763c2233..c1499381a 100644 --- a/tests/libtest/lib1515.c +++ b/tests/libtest/lib1515.c @@ -95,12 +95,13 @@ static int do_one_request(CURLM *m, char *URL, char *resolve) abort_on_test_timeout(); } - while((msg = curl_multi_info_read(m, &msgs_left))) { - if(msg->msg == CURLMSG_DONE && msg->easy_handle == curls) { + do { + msg = curl_multi_info_read(m, &msgs_left); + if(msg && msg->msg == CURLMSG_DONE && msg->easy_handle == curls) { res = msg->data.result; break; } - } + } while(msg); test_cleanup: |