mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
fix compiler warning
This commit is contained in:
parent
eae27d1788
commit
2ef72f7abb
@ -578,7 +578,7 @@ static bool trynextip(struct connectdata *conn,
|
|||||||
conn->sock[sockindex] = sockfd;
|
conn->sock[sockindex] = sockfd;
|
||||||
conn->ip_addr = ai;
|
conn->ip_addr = ai;
|
||||||
|
|
||||||
return Curl_store_ip_addr(conn) != CURLE_OK;
|
return (bool)(Curl_store_ip_addr(conn) != CURLE_OK);
|
||||||
}
|
}
|
||||||
ai = ai->ai_next;
|
ai = ai->ai_next;
|
||||||
}
|
}
|
||||||
|
@ -1958,11 +1958,11 @@ handle this request only supports 1.0. */
|
|||||||
static bool use_http_1_1(const struct SessionHandle *data,
|
static bool use_http_1_1(const struct SessionHandle *data,
|
||||||
const struct connectdata *conn)
|
const struct connectdata *conn)
|
||||||
{
|
{
|
||||||
return (data->set.httpversion == CURL_HTTP_VERSION_1_1) ||
|
return (bool)((data->set.httpversion == CURL_HTTP_VERSION_1_1) ||
|
||||||
((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
|
((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
|
||||||
((conn->httpversion == 11) ||
|
((conn->httpversion == 11) ||
|
||||||
((conn->httpversion != 10) &&
|
((conn->httpversion != 10) &&
|
||||||
(data->state.httpversion != 10))));
|
(data->state.httpversion != 10)))));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check and possibly add an Expect: header */
|
/* check and possibly add an Expect: header */
|
||||||
|
@ -2012,7 +2012,7 @@ static bool is_absolute_url(const char *url)
|
|||||||
char prot[16]; /* URL protocol string storage */
|
char prot[16]; /* URL protocol string storage */
|
||||||
char letter; /* used for a silly sscanf */
|
char letter; /* used for a silly sscanf */
|
||||||
|
|
||||||
return 2 == sscanf(url, "%15[^?&/:]://%c", prot, &letter);
|
return (bool)(2 == sscanf(url, "%15[^?&/:]://%c", prot, &letter));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1038,8 +1038,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
* other - POST is kept as POST after 301 and 302
|
* other - POST is kept as POST after 301 and 302
|
||||||
*/
|
*/
|
||||||
long postRedir = va_arg(param, long);
|
long postRedir = va_arg(param, long);
|
||||||
data->set.post301 = (postRedir & CURL_REDIR_POST_301)?1:0;
|
data->set.post301 = (bool)((postRedir & CURL_REDIR_POST_301)?TRUE:FALSE);
|
||||||
data->set.post302 = (postRedir & CURL_REDIR_POST_302)?1:0;
|
data->set.post302 = (bool)((postRedir & CURL_REDIR_POST_302)?TRUE:FALSE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3683,8 +3683,8 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
|
|||||||
if(conn->bits.httpproxy) {
|
if(conn->bits.httpproxy) {
|
||||||
/* we need to create new URL with the new port number */
|
/* we need to create new URL with the new port number */
|
||||||
char *url;
|
char *url;
|
||||||
bool isftp = strequal("ftp", conn->protostr) ||
|
bool isftp = (bool)(strequal("ftp", conn->protostr) ||
|
||||||
strequal("ftps", conn->protostr);
|
strequal("ftps", conn->protostr));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This synthesized URL isn't always right--suffixes like ;type=A
|
* This synthesized URL isn't always right--suffixes like ;type=A
|
||||||
|
Loading…
Reference in New Issue
Block a user