Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Automatic merge of jdk:master into master
- Loading branch information
|
|
@@ -1,5 +1,5 @@ |
|
|
/* |
|
|
* Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved. |
|
|
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. |
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
|
* |
|
|
* This code is free software; you can redistribute it and/or modify it |
|
@@ -739,6 +739,10 @@ static double zero = 0.0; /* used as const */ |
|
|
errno = EDOM; |
|
|
} |
|
|
break; |
|
|
default: |
|
|
exc.retval = zero / zero; |
|
|
errno = EINVAL; |
|
|
break; |
|
|
} |
|
|
return exc.retval; |
|
|
} |
|
@@ -1298,7 +1298,8 @@ static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs) { |
|
|
static int getIndex(int sock, const char *name) { |
|
|
struct ifreq if2; |
|
|
memset((char *)&if2, 0, sizeof(if2)); |
|
|
strncpy(if2.ifr_name, name, sizeof(if2.ifr_name) - 1); |
|
|
strncpy(if2.ifr_name, name, sizeof(if2.ifr_name)); |
|
|
if2.ifr_name[sizeof(if2.ifr_name) - 1] = 0; |
|
|
|
|
|
if (ioctl(sock, SIOCGIFINDEX, (char *)&if2) < 0) { |
|
|
return -1; |
|
@@ -1361,7 +1362,8 @@ static int getMTU(JNIEnv *env, int sock, const char *ifname) { |
|
|
static int getFlags(int sock, const char *ifname, int *flags) { |
|
|
struct ifreq if2; |
|
|
memset((char *)&if2, 0, sizeof(if2)); |
|
|
strncpy(if2.ifr_name, ifname, sizeof(if2.ifr_name) - 1); |
|
|
strncpy(if2.ifr_name, ifname, sizeof(if2.ifr_name)); |
|
|
if2.ifr_name[sizeof(if2.ifr_name) - 1] = 0; |
|
|
|
|
|
if (ioctl(sock, SIOCGIFFLAGS, (char *)&if2) < 0) { |
|
|
return -1; |
|
|