Skip to content

Commit 45cf042

Browse files
committed
8374082: net_util.c should use logical && when setting IPv6_available
Reviewed-by: alanb
1 parent 5eb8774 commit 45cf042

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/java.base/share/native/libnet/net_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ DEF_JNI_OnLoad(JavaVM *vm, void *reserved)
8181
* supporting socket APIs are available
8282
*/
8383
IPv4_available = IPv4_supported();
84-
IPv6_available = IPv6_supported() & (!preferIPv4Stack);
84+
IPv6_available = IPv6_supported() && !preferIPv4Stack;
8585

8686
/* check if SO_REUSEPORT is supported on this platform */
8787
REUSEPORT_available = reuseport_supported(IPv6_available);

0 commit comments

Comments
 (0)