From ddb4e9650873945c5bb3054b7e7227c5361c0905 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 27 Jul 2020 23:49:42 +0200 Subject: curl_multi_setopt: fix compiler warning "result is always false" On systems with 32 bit long the expression is always false. Avoid the warning. Reported-by: Gisle Vanem Bug: https://github.com/curl/curl/commit/61a08508f6a458fe21bbb18cd2a9bac2f039452b#commitcomment-40941232 Closes #5736 --- lib/multi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/multi.c b/lib/multi.c index 2ad502756..6b62ddaf7 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -2962,9 +2962,7 @@ CURLMcode curl_multi_setopt(struct Curl_multi *multi, long streams = va_arg(param, long); if(streams < 1) streams = 100; - multi->max_concurrent_streams = - (streams > (long)INITIAL_MAX_CONCURRENT_STREAMS)? - INITIAL_MAX_CONCURRENT_STREAMS : (unsigned int)streams; + multi->max_concurrent_streams = curlx_sltoui(streams); } break; default: -- cgit v1.2.1