aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-10-17 00:10:00 +0000
committerYang Tse <yangsita@gmail.com>2007-10-17 00:10:00 +0000
commit85877dae9af9c47df2e3cd27c904013fe676b150 (patch)
tree901016d49814ebfedf88c83d48a22104d39c4be9 /lib
parentc6ef31955a3990f28a009fd0a63127fada7bbffb (diff)
Fix compiler warning: comparison between signed and unsigned
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c5
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 */