summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-07-27 23:49:42 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-07-28 00:13:41 +0200
commitddb4e9650873945c5bb3054b7e7227c5361c0905 (patch)
tree2336da56e9e557beb23169ec4310e8699094cfed
parent34e5ad21d2cb98475acdbf7a3a6ea973d8c12249 (diff)
downloadcurl-bagder/multi-always-false.tar.gz
curl_multi_setopt: fix compiler warning "result is always false"bagder/multi-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
-rw-r--r--lib/multi.c4
1 files changed, 1 insertions, 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: