diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-10-15 00:53:08 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-10-15 00:53:08 +0200 |
commit | 253e5b801800e1cdfa63348b9ad1e25e1e546641 (patch) | |
tree | 2a6cb1867952e4aa09bb87f1c3fc8f9dd7fe26c2 | |
parent | 14d9b4e0015705239c0696357d2e2b995c13c93b (diff) | |
download | curl-253e5b801800e1cdfa63348b9ad1e25e1e546641.tar.gz |
fixup mistakes in the range checks
-rw-r--r-- | lib/url.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -880,7 +880,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * before it is considered failure. For pingpong protocols. */ arg = va_arg(param, long); - if((arg>=0) && (arg < (INT_MAX/1000))) + if((arg >= 0) && (arg < (INT_MAX/1000))) data->set.server_response_timeout = arg * 1000; else return CURLE_BAD_FUNCTION_ARGUMENT; @@ -1587,7 +1587,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * Set proxy type. HTTP/HTTP_1_0/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME */ arg = va_arg(param, long); - if((arg < CURLPROTO_HTTP) || (arg > CURLPROXY_SOCKS5_HOSTNAME)) + if((arg < CURLPROXY_HTTP) || (arg > CURLPROXY_SOCKS5_HOSTNAME)) return CURLE_BAD_FUNCTION_ARGUMENT; data->set.proxytype = (curl_proxytype)arg; break; @@ -1797,7 +1797,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * operation. */ arg = va_arg(param, long); - if((arg>=0) && (arg < (INT_MAX/1000))) + if((arg >= 0) && (arg < (INT_MAX/1000))) data->set.timeout = arg * 1000; else return CURLE_BAD_FUNCTION_ARGUMENT; @@ -1815,7 +1815,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * The maximum time you allow curl to use to connect. */ arg = va_arg(param, long); - if((arg>=0) && (arg < (INT_MAX/1000))) + if((arg >= 0) && (arg < (INT_MAX/1000))) data->set.connecttimeout = arg * 1000; else return CURLE_BAD_FUNCTION_ARGUMENT; |