From 1d7e2deaa79b0c566f222cb8415d6a17583579da Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 21 Sep 2020 18:04:09 +0200 Subject: fixup more return codes CURLE_UNKNOWN_OPTION is for bad options, but a bad argument to an option should rather use CURLE_BAD_FUNCTION_ARGUMENT --- lib/setopt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/setopt.c b/lib/setopt.c index a8d6ca926..0cda06757 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -437,7 +437,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) primary->version_max = version_max; } #else - result = CURLE_UNKNOWN_OPTION; + result = CURLE_BAD_FUNCTION_ARGUMENT; #endif break; @@ -1055,7 +1055,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) break; default: /* reserve other values for future use */ - result = CURLE_UNKNOWN_OPTION; + result = CURLE_BAD_FUNCTION_ARGUMENT; break; } break; -- cgit v1.2.1