From: Yang Tse Date: Wed, 17 Oct 2007 00:44:48 +0000 (+0000) Subject: Fix compiler warning: signed and unsigned type in conditional expression X-Git-Tag: upstream/7.37.1~8544 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=949073d44884203dcf0285a7c9f4ab477e6a0da9;p=platform%2Fupstream%2Fcurl.git Fix compiler warning: signed and unsigned type in conditional expression --- diff --git a/lib/connect.c b/lib/connect.c index 1f4562a..2ab97eb 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -697,11 +697,12 @@ singleipconnect(struct connectdata *conn, ai->ai_addrlen : (socklen_t)sizeof(struct Curl_sockaddr_storage); memcpy(&addr->addr, ai->ai_addr, addr->addrlen); - /* optionally use callback to get the socket */ - sockfd = (data->set.fopensocket)? - data->set.fopensocket(data->set.opensocket_client, CURLSOCKTYPE_IPCXN, - addr): - socket(addr->family, addr->socktype, addr->protocol); + /* If set, use opensocket callback to get the socket */ + if(data->set.fopensocket) + sockfd = data->set.fopensocket(data->set.opensocket_client, + CURLSOCKTYPE_IPCXN, addr); + else + sockfd = socket(addr->family, addr->socktype, addr->protocol); if (sockfd == CURL_SOCKET_BAD) return CURL_SOCKET_BAD;