RFR: 8254871: Remove unnecessary string copy in NetworkInterface.c

Mark Sheppard msheppar at openjdk.java.net
Wed Oct 28 17:12:45 UTC 2020


On Tue, 27 Oct 2020 12:12:47 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

>> A small improvement to avoid extra string copy.
>> 
>> [Tests]
>> Jtreg hotspot::hotspot_all_no_apps, jdk::jdk_core and langtools::tier1.
>> No new failure found.
>
> LGTM

In the original the copy would appear to be a way of enforcing that the supplied name is not greater than the max IF name size (IFNAMSIZ), 
so in the updated version if limit >= IFNAMSIZ is there any point in performing the search? As it is unlikely to match a returned interface name ?

-------------

PR: https://git.openjdk.java.net/jdk/pull/821


More information about the net-dev mailing list