mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
url: Ternary operator code style changes
This commit is contained in:
parent
9b03bca6e6
commit
5ee484c597
20
lib/url.c
20
lib/url.c
@ -936,7 +936,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
||||
break;
|
||||
|
||||
case CURLOPT_TRANSFER_ENCODING:
|
||||
data->set.http_transfer_encoding = (0 != va_arg(param, long))?TRUE:FALSE;
|
||||
data->set.http_transfer_encoding = (0 != va_arg(param, long)) ?
|
||||
TRUE : FALSE;
|
||||
break;
|
||||
|
||||
case CURLOPT_FOLLOWLOCATION:
|
||||
@ -1375,7 +1376,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
||||
/*
|
||||
* Tunnel operations through the proxy instead of normal proxy use
|
||||
*/
|
||||
data->set.tunnel_thru_httpproxy = (0 != va_arg(param, long))?TRUE:FALSE;
|
||||
data->set.tunnel_thru_httpproxy = (0 != va_arg(param, long)) ?
|
||||
TRUE : FALSE;
|
||||
break;
|
||||
|
||||
case CURLOPT_PROXYPORT:
|
||||
@ -1538,8 +1540,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
||||
*/
|
||||
result = setstropt(&data->set.str[STRING_FTPPORT],
|
||||
va_arg(param, char *));
|
||||
data->set.ftp_use_port = (NULL != data->set.str[STRING_FTPPORT]) ?
|
||||
TRUE:FALSE;
|
||||
data->set.ftp_use_port = (data->set.str[STRING_FTPPORT]) ? TRUE : FALSE;
|
||||
break;
|
||||
|
||||
case CURLOPT_FTP_USE_EPRT:
|
||||
@ -2000,7 +2001,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
||||
*/
|
||||
result = setstropt(&data->set.str[STRING_KRB_LEVEL],
|
||||
va_arg(param, char *));
|
||||
data->set.krb = (NULL != data->set.str[STRING_KRB_LEVEL])?TRUE:FALSE;
|
||||
data->set.krb = (data->set.str[STRING_KRB_LEVEL]) ? TRUE : FALSE;
|
||||
break;
|
||||
case CURLOPT_GSSAPI_DELEGATION:
|
||||
/*
|
||||
@ -3847,14 +3848,15 @@ static struct connectdata *allocate_conn(struct SessionHandle *data)
|
||||
*data->set.str[STRING_PROXY]) ? TRUE : FALSE;
|
||||
conn->bits.httpproxy = (conn->bits.proxy &&
|
||||
(conn->proxytype == CURLPROXY_HTTP ||
|
||||
conn->proxytype == CURLPROXY_HTTP_1_0))?TRUE:FALSE;
|
||||
conn->bits.proxy_user_passwd =
|
||||
(NULL != data->set.str[STRING_PROXYUSERNAME])?TRUE:FALSE;
|
||||
conn->proxytype == CURLPROXY_HTTP_1_0)) ?
|
||||
TRUE : FALSE;
|
||||
conn->bits.proxy_user_passwd = (data->set.str[STRING_PROXYUSERNAME]) ?
|
||||
TRUE : FALSE;
|
||||
conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy;
|
||||
|
||||
#endif /* CURL_DISABLE_PROXY */
|
||||
|
||||
conn->bits.user_passwd = (NULL != data->set.str[STRING_USERNAME])?TRUE:FALSE;
|
||||
conn->bits.user_passwd = (data->set.str[STRING_USERNAME]) ? TRUE : FALSE;
|
||||
conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
|
||||
conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user