On Tue, 19 Sep 2023 23:22:50 GMT, Alex Menkov <[email protected]> wrote:
>> Liam Miller-Cushon has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix pre-existing typo
>
> 1st pass in attach (line 970) is also not needed, can be something like
>
> - /* 1st pass - preferredAddressFamily (by default IPv4), 2nd pass -
> the rest */
> + // 1st pass - preferredAddressFamily (by default IPv4), 2nd pass -
> the rest;
> + // if java.net.preferIPv6Addresses == "system", only 2nd pass is
> needed
> + pass = preferredAddressFamily != AF_UNSPEC ? 0 : 1;
> - for (pass = 0; pass < 2 && socketFD < 0; pass++) {
> + for (; pass < 2 && socketFD < 0; pass++) {
> for (ai = addrInfo; ai != NULL; ai = ai->ai_next) {
Thanks @alexmenkov!
> The loop is not needed for AF_UNSPEC, just make it clear
Done
> 1st pass in attach (line 970) is also not needed, can be something like
Done
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15796#issuecomment-1726680374