From 253e5b801800e1cdfa63348b9ad1e25e1e546641 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 15 Oct 2017 00:53:08 +0200 Subject: fixup mistakes in the range checks --- lib/url.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/url.c b/lib/url.c index 633e2e397..40074ecda 100644 --- a/lib/url.c +++ b/lib/url.c @@ -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; -- cgit v1.2.1