1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

bindlocal: move brace out of #ifdef

The code within #ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID wrongly had two
closing braces when it should only have one, so builds without that
define would fail.

Bug: http://curl.haxx.se/mail/lib-2013-05/0000.html
This commit is contained in:
Lars Johannesen 2013-05-01 14:16:59 +02:00 committed by Daniel Stenberg
parent 46d26a0e77
commit 1c435295b8

View File

@ -413,22 +413,21 @@ static CURLcode bindlocal(struct connectdata *conn,
if(af == AF_INET6) { if(af == AF_INET6) {
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID #ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
char *scope_ptr = strchr(myhost, '%'); char *scope_ptr = strchr(myhost, '%');
if(scope_ptr)
if(scope_ptr) *(scope_ptr++) = 0; *(scope_ptr++) = 0;
#endif #endif
if(Curl_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) { if(Curl_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) {
si6->sin6_family = AF_INET6; si6->sin6_family = AF_INET6;
si6->sin6_port = htons(port); si6->sin6_port = htons(port);
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID #ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
if(scope_ptr) { if(scope_ptr)
/* The "myhost" string either comes from Curl_if2ip or /* The "myhost" string either comes from Curl_if2ip or from
from Curl_printable_address. The latter returns only Curl_printable_address. The latter returns only numeric scope
numeric scope IDs and the former returns none at all. IDs and the former returns none at all. So the scope ID, if
So the scope ID, if present, is known to be numeric */ present, is known to be numeric */
si6->sin6_scope_id = atoi(scope_ptr); si6->sin6_scope_id = atoi(scope_ptr);
}
}
#endif #endif
}
sizeof_sa = sizeof(struct sockaddr_in6); sizeof_sa = sizeof(struct sockaddr_in6);
} }
else else