mirror of
https://github.com/curl/curl.git
synced 2026-06-07 08:44:17 +03:00
make int* into bool*
This commit is contained in:
parent
33b0fb8b1e
commit
8f4d1068aa
7 changed files with 18 additions and 14 deletions
|
|
@ -72,7 +72,7 @@ static CURLcode cf_haproxy_date_out_set(struct Curl_cfilter*cf,
|
|||
CURLcode result;
|
||||
const char *client_ip;
|
||||
struct ip_quadruple ipquad;
|
||||
int is_ipv6;
|
||||
bool is_ipv6;
|
||||
|
||||
DEBUGASSERT(ctx);
|
||||
DEBUGASSERT(ctx->state == HAPROXY_INIT);
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ static CURLcode cf_verboseconnect(struct Curl_easy *data,
|
|||
{
|
||||
if(Curl_trc_is_verbose(data)) {
|
||||
struct ip_quadruple ipquad;
|
||||
int is_ipv6;
|
||||
bool is_ipv6;
|
||||
CURLcode result;
|
||||
|
||||
result = Curl_conn_cf_get_ip_info(cf, data, &is_ipv6, &ipquad);
|
||||
|
|
@ -620,7 +620,7 @@ bool Curl_conn_get_ssl_info(struct Curl_easy *data,
|
|||
|
||||
CURLcode Curl_conn_get_ip_info(struct Curl_easy *data,
|
||||
struct connectdata *conn, int sockindex,
|
||||
int *is_ipv6, struct ip_quadruple *ipquad)
|
||||
bool *is_ipv6, struct ip_quadruple *ipquad)
|
||||
{
|
||||
struct Curl_cfilter *cf = conn ? conn->cfilter[sockindex] : NULL;
|
||||
return Curl_conn_cf_get_ip_info(cf, data, is_ipv6, ipquad);
|
||||
|
|
@ -874,11 +874,15 @@ cf_get_remote_addr(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|||
|
||||
CURLcode Curl_conn_cf_get_ip_info(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
int *is_ipv6, struct ip_quadruple *ipquad)
|
||||
bool *is_ipv6, struct ip_quadruple *ipquad)
|
||||
{
|
||||
if(cf)
|
||||
return cf->cft->query(cf, data, CF_QUERY_IP_INFO, is_ipv6, ipquad);
|
||||
return CURLE_UNKNOWN_OPTION;
|
||||
CURLcode result = CURLE_UNKNOWN_OPTION;
|
||||
if(cf) {
|
||||
int ipv6 = 0;
|
||||
result = cf->cft->query(cf, data, CF_QUERY_IP_INFO, &ipv6, ipquad);
|
||||
*is_ipv6 = !!ipv6;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
curl_socket_t Curl_conn_get_socket(struct Curl_easy *data, int sockindex)
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ curl_socket_t Curl_conn_cf_get_socket(struct Curl_cfilter *cf,
|
|||
|
||||
CURLcode Curl_conn_cf_get_ip_info(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
int *is_ipv6, struct ip_quadruple *ipquad);
|
||||
bool *is_ipv6, struct ip_quadruple *ipquad);
|
||||
|
||||
bool Curl_conn_cf_needs_flush(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data);
|
||||
|
|
@ -406,7 +406,7 @@ bool Curl_conn_get_ssl_info(struct Curl_easy *data,
|
|||
|
||||
CURLcode Curl_conn_get_ip_info(struct Curl_easy *data,
|
||||
struct connectdata *conn, int sockindex,
|
||||
int *is_ipv6, struct ip_quadruple *ipquad);
|
||||
bool *is_ipv6, struct ip_quadruple *ipquad);
|
||||
|
||||
/**
|
||||
* Connection provides multiplexing of easy handles at `socketindex`.
|
||||
|
|
|
|||
|
|
@ -1000,7 +1000,7 @@ static CURLcode cf_he_connect(struct Curl_cfilter *cf,
|
|||
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
||||
if(Curl_trc_cf_is_verbose(cf, data)) {
|
||||
struct ip_quadruple ipquad;
|
||||
int is_ipv6;
|
||||
bool is_ipv6;
|
||||
if(!Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad)) {
|
||||
const char *host;
|
||||
int port;
|
||||
|
|
|
|||
|
|
@ -1797,7 +1797,7 @@ static char *control_address_dup(struct Curl_easy *data,
|
|||
struct connectdata *conn)
|
||||
{
|
||||
struct ip_quadruple ipquad;
|
||||
int is_ipv6;
|
||||
bool is_ipv6;
|
||||
|
||||
/* Returns the control connection IP address.
|
||||
If a proxy tunnel is used, returns the original hostname instead, because
|
||||
|
|
@ -1931,7 +1931,7 @@ static CURLcode ftp_state_pasv_resp(struct Curl_easy *data,
|
|||
* here. We do not want to rely on a former host lookup that might've
|
||||
* expired now, instead we remake the lookup here and now! */
|
||||
struct ip_quadruple ipquad;
|
||||
int is_ipv6;
|
||||
bool is_ipv6;
|
||||
const char * const host_name = conn->bits.socksproxy ?
|
||||
conn->socks_proxy.host.name : conn->http_proxy.host.name;
|
||||
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done)
|
|||
char *user = NULL;
|
||||
char *passwd = NULL;
|
||||
struct ip_quadruple ipquad;
|
||||
int is_ipv6;
|
||||
bool is_ipv6;
|
||||
|
||||
*done = TRUE; /* unconditionally */
|
||||
infof(data, "LDAP local: LDAP Vendor = %s ; LDAP Version = %d",
|
||||
|
|
|
|||
|
|
@ -1142,7 +1142,7 @@ static CURLcode socks_proxy_cf_connect(struct Curl_cfilter *cf,
|
|||
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
||||
if(Curl_trc_is_verbose(data)) {
|
||||
struct ip_quadruple ipquad;
|
||||
int is_ipv6;
|
||||
bool is_ipv6;
|
||||
result = Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad);
|
||||
if(result)
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue