From: Daniel Stenberg Date: Thu, 22 Aug 2024 11:17:27 +0000 (+0200) Subject: setopt: let CURLOPT_ECH set to NULL reset to default X-Git-Tag: curl-8_10_0~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05609bac95709beb387e5273ca33a6054bc89b0b;p=thirdparty%2Fcurl.git setopt: let CURLOPT_ECH set to NULL reset to default Because NULL is documented as default and most options that take pointers accept NULL to reset back to internal default. Closes #14634 --- diff --git a/lib/setopt.c b/lib/setopt.c index 9d695e09d3..e8d7ada14e 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -3188,8 +3188,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) argptr = va_arg(param, char *); if(!argptr) { data->set.tls_ech = CURLECH_DISABLE; - result = CURLE_BAD_FUNCTION_ARGUMENT; - return result; + return CURLE_OK; } plen = strlen(argptr); if(plen > CURL_MAX_INPUT_LENGTH) {