examples/multi-single: fix scan-build warning

warning: Value stored to 'mc' during its initialization is never read

Follow-up to ae8e11ed5f

Closes #7360
This commit is contained in:
Daniel Stenberg 2021-07-07 10:14:35 +02:00
parent 1e488d38c9
commit 1026b36ea0
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 5 additions and 4 deletions

View File

@ -68,11 +68,12 @@ int main(void)
do {
CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
/* wait for activity, timeout or "nothing" */
mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
if(!mc)
/* wait for activity, timeout or "nothing" */
mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
if(mc != CURLM_OK) {
fprintf(stderr, "curl_multi_wait() failed, code %d.\n", mc);
if(mc) {
fprintf(stderr, "curl_multi_poll() failed, code %d.\n", (int)mc);
break;
}