aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2017-11-02 00:30:28 -0400
committerJay Satiro <raysatiro@yahoo.com>2017-11-02 00:30:28 -0400
commitb51e0742b9349c6414956570c76a2152f5b22106 (patch)
treee81d21b23a4f4157133fd3880731abb9b1438b4b
parent544bfdebea2a9e8be1c01fc7954cd49638fe2803 (diff)
url: fix CURLOPT_DNS_CACHE_TIMEOUT arg value check to allow -1
Prior to this change since f121575 (7.56.1+) CURLOPT_DNS_CACHE_TIMEOUT erroneously rejected -1 with CURLE_BAD_FUNCTION_ARGUMENT.
-rw-r--r--lib/url.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index c334578ea..2e801e58f 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -722,7 +722,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
switch(option) {
case CURLOPT_DNS_CACHE_TIMEOUT:
arg = va_arg(param, long);
- if(arg < 0)
+ if(arg < -1)
return CURLE_BAD_FUNCTION_ARGUMENT;
data->set.dns_cache_timeout = arg;
break;