]> granicus.if.org Git - curl/commitdiff
avoid a warning about declaring a variable that shadows an earlier declared
authorDaniel Stenberg <daniel@haxx.se>
Tue, 18 Apr 2006 10:51:07 +0000 (10:51 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 18 Apr 2006 10:51:07 +0000 (10:51 +0000)
one

lib/connect.c

index 8964ec551e7ff6f87e294c0f9c65e33168f85458..f0865f47c55d716edd615aac7bbed190665da712 100644 (file)
@@ -375,7 +375,6 @@ static CURLcode bindlocal(struct connectdata *conn,
     if( bind(sockfd, sock, socksize) >= 0) {
       /* we succeeded to bind */
       struct Curl_sockaddr_storage add;
-      unsigned short port = 0;
       size_t size;
 
       size = sizeof(add);
@@ -384,6 +383,7 @@ static CURLcode bindlocal(struct connectdata *conn,
         failf(data, "getsockname() failed");
         return CURLE_HTTP_PORT_FAILED;
       }
+      /* We re-use/clobber the port variable here below */
       if(((struct sockaddr *)&add)->sa_family == AF_INET)
         port = ntohs(((struct sockaddr_in *)&add)->sin_port);
 #ifdef ENABLE_IPV6