fix bool variables checking and assignment

This commit is contained in:
Yang Tse
2011-09-05 20:46:09 +02:00
parent eb44ac0138
commit a50210710a
23 changed files with 128 additions and 129 deletions

View File

@@ -69,10 +69,10 @@ static bool safe_strequal(char* str1, char* str2)
{
if(str1 && str2)
/* both pointers point to something then compare them */
return (bool)(0 != Curl_raw_equal(str1, str2));
return (0 != Curl_raw_equal(str1, str2)) ? TRUE : FALSE;
else
/* if both pointers are NULL then treat them as equal */
return (bool)(!str1 && !str2);
return (!str1 && !str2) ? TRUE : FALSE;
}
bool
@@ -210,7 +210,7 @@ Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex,
/* mark this is being ssl requested from here on. */
conn->ssl[sockindex].use = TRUE;
res = curlssl_connect_nonblocking(conn, sockindex, done);
if(!res && *done == TRUE)
if(!res && *done)
Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
return res;
#else