From: Orgad Shaneh Date: Mon, 24 May 2021 18:57:45 +0000 (+0300) Subject: setopt: streamline ssl option code X-Git-Tag: curl-7_77_0~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2864b00b01ec325124cf11e94c4871db0eaf60b4;p=thirdparty%2Fcurl.git setopt: streamline ssl option code Make it use the same style as the code next to it Closes #7123 --- diff --git a/lib/setopt.c b/lib/setopt.c index 1ded7ad3e0..fb8b86d474 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -2311,8 +2311,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) case CURLOPT_SSL_OPTIONS: arg = va_arg(param, long); - data->set.ssl.enable_beast = - (bool)((arg&CURLSSLOPT_ALLOW_BEAST) ? TRUE : FALSE); + data->set.ssl.enable_beast = !!(arg & CURLSSLOPT_ALLOW_BEAST); data->set.ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE); data->set.ssl.no_partialchain = !!(arg & CURLSSLOPT_NO_PARTIALCHAIN); data->set.ssl.revoke_best_effort = !!(arg & CURLSSLOPT_REVOKE_BEST_EFFORT); @@ -2325,8 +2324,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) #ifndef CURL_DISABLE_PROXY case CURLOPT_PROXY_SSL_OPTIONS: arg = va_arg(param, long); - data->set.proxy_ssl.enable_beast = - (bool)((arg&CURLSSLOPT_ALLOW_BEAST) ? TRUE : FALSE); + data->set.proxy_ssl.enable_beast = !!(arg & CURLSSLOPT_ALLOW_BEAST); data->set.proxy_ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE); data->set.proxy_ssl.no_partialchain = !!(arg & CURLSSLOPT_NO_PARTIALCHAIN); data->set.proxy_ssl.revoke_best_effort =