Hi Alan, thanks for the comment. I created https://bugs.openjdk.org/browse/JDK-8320168 .
Best regards, Matthias From: Alan Bateman <[email protected]> Sent: Tuesday, 14 November 2023 20:02 To: Baesken, Matthias <[email protected]>; [email protected]; [email protected] Cc: Zeller, Arno <[email protected]>; Langer, Christoph <[email protected]> Subject: Re: return-value check of setsockopt ? On 14/11/2023 15:16, Baesken, Matthias wrote: Hi, while looking at some net/nio coding, I noticed that at a lot of places the return value of setsockopt is checked : https://github.com/search?q=repo%3Aopenjdk%2Fjdk+%22setsockopt%22&type=code but the check is omitted at some places . The setsockopt usages in ping4 and ping6 (Inet4Address.c and Inet6Address.c) should probably have checks. There are a few others where they are set when supported. An argument could be made to have these handle other errors. So I think it means working through them on a case-by-case basis. -Alan
