From: Daniel Stenberg Date: Mon, 27 Jul 2020 21:49:42 +0000 (+0200) Subject: curl_multi_setopt: fix compiler warning "result is always false" X-Git-Tag: curl-7_72_0~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abe59221fc6c683563a83bb8fbc1d7a52c315c0f;p=thirdparty%2Fcurl.git 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 --- diff --git a/lib/multi.c b/lib/multi.c index 2ad5027568..6b62ddaf76 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: