RFR: 8364816: GetLastError() in os_windows.cpp should not store value to errno [v7]
Anton Artemov
duke at openjdk.org
Tue Sep 2 07:31:28 UTC 2025
On Mon, 1 Sep 2025 21:34:41 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update src/hotspot/os/windows/os_windows.cpp
>>
>> 8364816: Added _set_errno(0) to avoid reading old values.
>>
>> Co-authored-by: Joel Sikström <joel.sikstrom at oracle.com>
>
> src/hotspot/os/windows/os_windows.cpp line 4823:
>
>> 4821: errno = ENOENT;
>> 4822: } else {
>> 4823: _set_errno(0);
>
> I don't object to setting it to zero explicitly but we do not need to use `_set_errno` to do it!
> Suggestion:
>
> errno = 0;
Addressed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26901#discussion_r2315171756
More information about the hotspot-runtime-dev
mailing list