RFR: JDK-8300222: Replace NULL with nullptr in share/logging
Coleen Phillimore
coleenp at openjdk.org
Wed Jan 18 13:37:11 UTC 2023
On Wed, 18 Jan 2023 11:21:23 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> src/hotspot/share/logging/logDecorations.cpp line 42:
>>
>>> 40: if (os::get_host_name(buffer, sizeof(buffer))) {
>>> 41: host_name = os::strdup_check_oom(buffer);
>>> 42: const char* old_value = Atomic::cmpxchg(&_host_name, (const char*)nullptr, host_name);
>>
>> I wonder if you need this cast with nullptr ?
>
> The nullptr argument is templated, so we do need the cast.
Thanks for checking. I won't ask on the next one. :)
-------------
PR: https://git.openjdk.org/jdk/pull/12014
More information about the hotspot-runtime-dev
mailing list