return-value check of setsockopt ?
Baesken, Matthias
matthias.baesken at sap.com
Thu Nov 16 08:40:45 UTC 2023
Hi Alan, thanks for the comment.
I created https://bugs.openjdk.org/browse/JDK-8320168 .
Best regards, Matthias
From: Alan Bateman <Alan.Bateman at oracle.com>
Sent: Tuesday, 14 November 2023 20:02
To: Baesken, Matthias <matthias.baesken at sap.com>; nio-dev at openjdk.org; net-dev at openjdk.org
Cc: Zeller, Arno <arno.zeller at sap.com>; Langer, Christoph <christoph.langer at sap.com>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/net-dev/attachments/20231116/4e1b2534/attachment-0001.htm>
More information about the net-dev
mailing list