aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLars Johannesen <lj@halloffame.dk>2013-05-01 14:16:59 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-05-01 14:18:47 +0200
commit1c435295b867f99dc76a095b9ca992fdd57583e8 (patch)
tree13b98a75b3749399fb3abae67ef2b57034545dd4 /lib
parent46d26a0e77d9c93482413027b7b140140269fa2e (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 6090abb36..2d5b641af 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -413,23 +413,22 @@ static CURLcode bindlocal(struct connectdata *conn,
if(af == AF_INET6) {
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
char *scope_ptr = strchr(myhost, '%');
-
- if(scope_ptr) *(scope_ptr++) = 0;
+ if(scope_ptr)
+ *(scope_ptr++) = 0;
#endif
if(Curl_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) {
si6->sin6_family = AF_INET6;
si6->sin6_port = htons(port);
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
- if(scope_ptr) {
- /* The "myhost" string either comes from Curl_if2ip or
- from Curl_printable_address. The latter returns only
- numeric scope IDs and the former returns none at all.
- So the scope ID, if present, is known to be numeric */
+ if(scope_ptr)
+ /* The "myhost" string either comes from Curl_if2ip or from
+ Curl_printable_address. The latter returns only numeric scope
+ IDs and the former returns none at all. So the scope ID, if
+ present, is known to be numeric */
si6->sin6_scope_id = atoi(scope_ptr);
- }
- }
#endif
- sizeof_sa = sizeof(struct sockaddr_in6);
+ }
+ sizeof_sa = sizeof(struct sockaddr_in6);
}
else
#endif