diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-07-27 23:49:42 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-07-28 23:37:01 +0200 |
commit | abe59221fc6c683563a83bb8fbc1d7a52c315c0f (patch) | |
tree | 0a171c8717585c310e4a97e7a26ca6addaed3214 | |
parent | 81b4e99b1e1a5a6ac06bcfba1bf4464085ea9688 (diff) | |
download | curl-abe59221fc6c683563a83bb8fbc1d7a52c315c0f.tar.gz |
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
-rw-r--r-- | lib/multi.c | 4 |
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: |