RFR: JDK-8300222: Replace NULL with nullptr in share/logging
Johan Sjölen
jsjolen at openjdk.org
Wed Jan 18 11:24:20 UTC 2023
On Tue, 17 Jan 2023 14:17:00 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Do the conversion in the share/logging sub-directory and all of its files.
>
> 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.
-------------
PR: https://git.openjdk.org/jdk/pull/12014
More information about the hotspot-runtime-dev
mailing list