On Wed, 26 Mar 2025 08:36:21 GMT, Sergey Bylokhov <[email protected]> wrote:
>> Daniel Gredler has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Wrap line at 80 chars
>
> src/java.desktop/windows/native/libfontmanager/lcdglyph.c line 126:
>
>> 124:
>> 125: JNIEXPORT void JNICALL Java_sun_font_FileFontStrike_initNative(JNIEnv
>> *env, jclass unused) {
>> 126: memset(igLUTable, 0, sizeof igLUTable);
>
> This line was updated in https://github.com/openjdk/jdk/pull/9772 but I
> wonder if we actually need it? can we initialize it in the code above with =
> {0}? If that is possible we can drop this method completely.
> BTW what is the default content of this global static array - zeros? I still
> prefer {0} for readability even if default is zero.
I'll defer to you and Phil on this one. The existing code base seems to use
`memset` much more often than vanilla array init, even just for zeroes. I had
also assumed that we would want to keep `initNative`, rather than initializing
immediately, but I'm happy to eliminate it if my assumption was wrong.
@prrace: Thoughts?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24230#discussion_r2014313902