aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-09-08 19:34:58 +0000
committerYang Tse <yangsita@gmail.com>2008-09-08 19:34:58 +0000
commit2ef72f7abb0f955d08a7f26d1a65a21be26b1af9 (patch)
tree22b8d1aaea77650ea5aa901d953f805b46746aab /lib
parenteae27d178829e0a2529c6e51a1b9b7acb08f7d14 (diff)
fix compiler warning
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c2
-rw-r--r--lib/http.c4
-rw-r--r--lib/transfer.c2
-rw-r--r--lib/url.c8
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 860111f56..3773b8280 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -578,7 +578,7 @@ static bool trynextip(struct connectdata *conn,
conn->sock[sockindex] = sockfd;
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;
}
diff --git a/lib/http.c b/lib/http.c
index e223c1f92..b57d9b592 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1958,11 +1958,11 @@ handle this request only supports 1.0. */
static bool use_http_1_1(const struct SessionHandle *data,
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) &&
((conn->httpversion == 11) ||
((conn->httpversion != 10) &&
- (data->state.httpversion != 10))));
+ (data->state.httpversion != 10)))));
}
/* check and possibly add an Expect: header */
diff --git a/lib/transfer.c b/lib/transfer.c
index 1e22b2646..8d2d0db82 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -2012,7 +2012,7 @@ static bool is_absolute_url(const char *url)
char prot[16]; /* URL protocol string storage */
char letter; /* used for a silly sscanf */
- return 2 == sscanf(url, "%15[^?&/:]://%c", prot, &letter);
+ return (bool)(2 == sscanf(url, "%15[^?&/:]://%c", prot, &letter));
}
/*
diff --git a/lib/url.c b/lib/url.c
index 197548a12..a79ab9d78 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1038,8 +1038,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* other - POST is kept as POST after 301 and 302
*/
long postRedir = va_arg(param, long);
- data->set.post301 = (postRedir & CURL_REDIR_POST_301)?1:0;
- data->set.post302 = (postRedir & CURL_REDIR_POST_302)?1:0;
+ data->set.post301 = (bool)((postRedir & CURL_REDIR_POST_301)?TRUE:FALSE);
+ data->set.post302 = (bool)((postRedir & CURL_REDIR_POST_302)?TRUE:FALSE);
}
break;
@@ -3683,8 +3683,8 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
if(conn->bits.httpproxy) {
/* we need to create new URL with the new port number */
char *url;
- bool isftp = strequal("ftp", conn->protostr) ||
- strequal("ftps", conn->protostr);
+ bool isftp = (bool)(strequal("ftp", conn->protostr) ||
+ strequal("ftps", conn->protostr));
/*
* This synthesized URL isn't always right--suffixes like ;type=A