diff options
author | Kim Barrett <kim.barrett@oracle.com> | 2024-03-03 02:42:51 +0000 |
---|---|---|
committer | Kim Barrett <kim.barrett@oracle.com> | 2024-03-03 03:00:10 +0000 |
commit | 55355d0c8c4ee5601bef2db5bb3613024b3ce67d (patch) | |
tree | 26159f07b29e5127a8e4dd04d2afa84545bb7359 | |
parent | 37e01efb7831e29068f834fe0629595cb721b90d (diff) |
NULL -> nullptrpr/18096
-rw-r--r-- | src/hotspot/os/aix/os_aix.cpp | 4 | ||||
-rw-r--r-- | src/hotspot/os/bsd/os_bsd.cpp | 4 | ||||
-rw-r--r-- | test/hotspot/gtest/runtime/test_os_linux.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/hotspot/os/aix/os_aix.cpp b/src/hotspot/os/aix/os_aix.cpp index 0c1c0dbc6dc..f6312f2f882 100644 --- a/src/hotspot/os/aix/os_aix.cpp +++ b/src/hotspot/os/aix/os_aix.cpp @@ -278,7 +278,7 @@ julong os::Aix::available_memory() { jlong os::total_swap_space() { perfstat_memory_total_t memory_info; - if (libperfstat::perfstat_memory_total(NULL, &memory_info, sizeof(perfstat_memory_total_t), 1) == -1) { + if (libperfstat::perfstat_memory_total(nullptr, &memory_info, sizeof(perfstat_memory_total_t), 1) == -1) { return -1; } return (jlong)(memory_info.pgsp_total * 4 * K); @@ -286,7 +286,7 @@ jlong os::total_swap_space() { jlong os::free_swap_space() { perfstat_memory_total_t memory_info; - if (libperfstat::perfstat_memory_total(NULL, &memory_info, sizeof(perfstat_memory_total_t), 1) == -1) { + if (libperfstat::perfstat_memory_total(nullptr, &memory_info, sizeof(perfstat_memory_total_t), 1) == -1) { return -1; } return (jlong)(memory_info.pgsp_free * 4 * K); diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp index 0e67228de7b..86d81a59f0d 100644 --- a/src/hotspot/os/bsd/os_bsd.cpp +++ b/src/hotspot/os/bsd/os_bsd.cpp @@ -184,7 +184,7 @@ jlong os::total_swap_space() { #if defined(__APPLE__) struct xsw_usage vmusage; size_t size = sizeof(vmusage); - if (sysctlbyname("vm.swapusage", &vmusage, &size, NULL, 0) != 0) { + if (sysctlbyname("vm.swapusage", &vmusage, &size, nullptr, 0) != 0) { return -1; } return (jlong)vmusage.xsu_total; @@ -197,7 +197,7 @@ jlong os::free_swap_space() { #if defined(__APPLE__) struct xsw_usage vmusage; size_t size = sizeof(vmusage); - if (sysctlbyname("vm.swapusage", &vmusage, &size, NULL, 0) != 0) { + if (sysctlbyname("vm.swapusage", &vmusage, &size, nullptr, 0) != 0) { return -1; } return (jlong)vmusage.xsu_avail; diff --git a/test/hotspot/gtest/runtime/test_os_linux.cpp b/test/hotspot/gtest/runtime/test_os_linux.cpp index 20a6257df04..69c3d991b2a 100644 --- a/test/hotspot/gtest/runtime/test_os_linux.cpp +++ b/test/hotspot/gtest/runtime/test_os_linux.cpp @@ -356,7 +356,7 @@ TEST_VM(os_linux, pretouch_thp_and_use_concurrent) { const bool useThp = UseTransparentHugePages; UseTransparentHugePages = true; char* const heap = os::reserve_memory(size, false, mtInternal); - EXPECT_NE(heap, (char*)NULL); + EXPECT_NE(heap, nullptr); EXPECT_TRUE(os::commit_memory(heap, size, false)); { |