diff options
author | Yang Tse <yangsita@gmail.com> | 2007-10-17 00:10:00 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2007-10-17 00:10:00 +0000 |
commit | 85877dae9af9c47df2e3cd27c904013fe676b150 (patch) | |
tree | 901016d49814ebfedf88c83d48a22104d39c4be9 | |
parent | c6ef31955a3990f28a009fd0a63127fada7bbffb (diff) |
Fix compiler warning: comparison between signed and unsigned
-rw-r--r-- | lib/connect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/connect.c b/lib/connect.c index 918602c2d..1f4562a9a 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -692,8 +692,9 @@ singleipconnect(struct connectdata *conn, addr->family=ai->ai_family; addr->socktype=conn->socktype; addr->protocol=ai->ai_protocol; - addr->addrlen=(ai->ai_addrlen<=sizeof(struct Curl_sockaddr_storage))? - ai->ai_addrlen:sizeof(struct Curl_sockaddr_storage); + addr->addrlen = + (ai->ai_addrlen < (socklen_t)sizeof(struct Curl_sockaddr_storage)) ? + 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 */ |