urldata: tweak the UserDefined struct

By better sticking to listing the struct members sorted by size, this
struct is now 48 bytes smaller on my fairly maximized build, without
removing anything.

Turned 'connect_only' into two bits instead of an unsigned char with two
magic values.

Also put the 'gssapi_delegation' field within ifdef HAVE_GSSAPI.

Closes #16097
This commit is contained in:
Daniel Stenberg 2025-01-27 09:34:57 +01:00
parent 5b73a7b637
commit 35b1c1585b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 53 additions and 41 deletions

View file

@ -917,6 +917,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
break;
#endif
#ifdef HAVE_GSSAPI
case CURLOPT_GSSAPI_DELEGATION:
/*
* GSS-API credential delegation bitmask
@ -924,6 +925,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
data->set.gssapi_delegation = (unsigned char)uarg&
(CURLGSSAPI_DELEGATION_POLICY_FLAG|CURLGSSAPI_DELEGATION_FLAG);
break;
#endif
case CURLOPT_SSL_VERIFYPEER:
/*
* Enable peer SSL verifying.
@ -1104,7 +1106,8 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
*/
if(arg > 2)
return CURLE_BAD_FUNCTION_ARGUMENT;
data->set.connect_only = (unsigned char)arg;
data->set.connect_only = !!arg;
data->set.connect_only_ws = (arg == 2);
break;
case CURLOPT_SSL_SESSIONID_CACHE: