aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-09-05 20:46:09 +0200
committerYang Tse <yangsita@gmail.com>2011-09-05 20:46:09 +0200
commita50210710ab6fd772e2762ed36602c15adfb49e1 (patch)
tree9ac720a0c9c0b628e1bfeba3b64c5a944e468117 /lib/cookie.c
parenteb44ac013832aab80c3ed90292d7b4f25a8a4d75 (diff)
fix bool variables checking and assignment
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 0553efb98..52a2ccb05 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -126,7 +126,7 @@ static bool tailmatch(const char *little, const char *bigone)
if(littlelen > biglen)
return FALSE;
- return (bool)Curl_raw_equal(little, bigone+biglen-littlelen);
+ return Curl_raw_equal(little, bigone+biglen-littlelen) ? TRUE : FALSE;
}
/*
@@ -241,7 +241,7 @@ Curl_cookie_add(struct SessionHandle *data,
endofn++;
/* name ends with a '=' ? */
- sep = *endofn == '='?TRUE:FALSE;
+ sep = (*endofn == '=')?TRUE:FALSE;
/* Strip off trailing whitespace from the 'what' */
while(len && ISBLANK(what[len-1])) {
@@ -527,7 +527,7 @@ Curl_cookie_add(struct SessionHandle *data,
As far as I can see, it is set to true when the cookie says
.domain.com and to false when the domain is complete www.domain.com
*/
- co->tailmatch=(bool)Curl_raw_equal(ptr, "TRUE");
+ co->tailmatch = Curl_raw_equal(ptr, "TRUE")?TRUE:FALSE;
break;
case 2:
/* It turns out, that sometimes the file format allows the path
@@ -547,7 +547,7 @@ Curl_cookie_add(struct SessionHandle *data,
fields++; /* add a field and fall down to secure */
/* FALLTHROUGH */
case 3:
- co->secure = (bool)Curl_raw_equal(ptr, "TRUE");
+ co->secure = Curl_raw_equal(ptr, "TRUE")?TRUE:FALSE;
break;
case 4:
co->expires = curlx_strtoofft(ptr, NULL, 10);