aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-04-18 10:51:07 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-04-18 10:51:07 +0000
commit17bf5ac2fca38fc1f54a89a526a577ef0dea0295 (patch)
treed8d32bf8d395053d3b8bef24f4d055fd68eccea2
parent343b882d802d4005eeeaaaf7bcfa9f0bdf6df2d3 (diff)
avoid a warning about declaring a variable that shadows an earlier declared
one
-rw-r--r--lib/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 8964ec551..f0865f47c 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -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