]> granicus.if.org Git - curl/commitdiff
make sure the 3rd argument passed to bind() is a socklen_t
authorDaniel Stenberg <daniel@haxx.se>
Sun, 4 Jul 2004 21:48:54 +0000 (21:48 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 4 Jul 2004 21:48:54 +0000 (21:48 +0000)
lib/connect.c
lib/ftp.c

index ce3d40cf19ed859235a53c0d046e0dc21b9e66de..de8d29726e739a14ddc54cd75052af899c15d7e1 100644 (file)
@@ -336,7 +336,7 @@ static CURLcode bindlocal(struct connectdata *conn,
         Curl_resolv_unlock(data, h);
         /* we don't need it anymore after this function has returned */
 
-        if( bind(sockfd, addr->ai_addr, addr->ai_addrlen) >= 0) {
+        if( bind(sockfd, addr->ai_addr, (socklen_t)addr->ai_addrlen) >= 0) {
           /* we succeeded to bind */
 #ifdef ENABLE_IPV6
           struct sockaddr_in6 add;
index 6cf6fcafbfadf0286e9410e8b2faa53378fe8642..88c9753a715b37590eae7a4ea66af6e8378a3052 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1330,7 +1330,7 @@ CURLcode ftp_use_port(struct connectdata *conn)
   if (addr || sa_filled_in) {
     portsock = socket(AF_INET, SOCK_STREAM, 0);
     if(CURL_SOCKET_BAD != portsock) {
-      int size;
+      socklen_t size;
 
       /* we set the secondary socket variable to this for now, it
          is only so that the cleanup function will close it in case