RFR: 8334599: Improve code from JDK-8302671 [v2]
Alexey Ivanov
aivanov at openjdk.org
Mon Jul 22 18:42:33 UTC 2024
On Thu, 11 Jul 2024 08:36:54 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> src/java.desktop/windows/native/libawt/windows/awt_Component.cpp line 3368:
>>
>>> 3366: BYTE tmpState[AwtToolkit::KB_STATE_SIZE];
>>> 3367: WCHAR wc[2];
>>> 3368: memmove(tmpState, kstate, sizeof (kstate));
>>
>> Suggestion:
>>
>> memmove(tmpState, kstate, sizeof(kstate));
>>
>> There's usually no space after `sizeof`.
>
> Ah, seems awt follows a different convention from HotSpot, which I'm nmore used to. I'll revert the formatting
I just searched for `sizeof` in the file. The next function has
memset(kbdState, 0, sizeof (kbdState));
with a space. Other usages in the file don't. I'm following the convention used in the file.
Please, don't change this single instance above, let it stay.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19798#discussion_r1686995038
More information about the client-libs-dev
mailing list