summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-09-21 18:04:09 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-09-21 18:04:09 +0200
commit1d7e2deaa79b0c566f222cb8415d6a17583579da (patch)
treee9a49cf9188a807c39d721191836cb6eb9117b85
parenta162a816bdbad0ebf7776217287499ebc838e636 (diff)
downloadcurl-bagder/setopt-cleanup.tar.gz
fixup more return codesbagder/setopt-cleanup
CURLE_UNKNOWN_OPTION is for bad options, but a bad argument to an option should rather use CURLE_BAD_FUNCTION_ARGUMENT
-rw-r--r--lib/setopt.c4
1 files 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;