From a50210710ab6fd772e2762ed36602c15adfb49e1 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 5 Sep 2011 20:46:09 +0200 Subject: fix bool variables checking and assignment --- lib/cookie.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/cookie.c') 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); -- cgit v1.2.3