Fix to_ip6address sub variables scope and missing ;

44b98ef4fc
This commit is contained in:
Ilia Rostovtsev
2021-03-16 16:24:25 +03:00
parent 68ff9998a8
commit b337c192c8

View File

@@ -3351,8 +3351,7 @@ else {
eval {
my @ai = getaddrinfo($host, undef, AF_INET6(), SOCK_STREAM);
while(@ai) {
my @newia;
(undef, undef, undef, $inaddr, undef, @newai) = @ai;
my (undef, undef, undef, $inaddr, undef, @newai) = @ai;
if ($inaddr) {
my $addr;
(undef, $addr) = unpack_sockaddr_in6($inaddr);
@@ -3360,7 +3359,7 @@ else {
}
@ai = @newai;
}
}
};
}
return wantarray ? @rv : $rv[0];
}