Skip to content

Commit a72bdbf

Browse files
committed
8303047: avoid NULL after 8301661
Backport-of: 221f34634de58d339f6cf7b08b2520fb748fff82
1 parent 62140e2 commit a72bdbf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/hotspot/os/bsd/os_bsd.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,15 +1379,15 @@ void os::print_os_info(outputStream* st) {
13791379

13801380
#ifdef __APPLE__
13811381
static void print_sysctl_info_string(const char* sysctlkey, outputStream* st, char* buf, size_t size) {
1382-
if (sysctlbyname(sysctlkey, buf, &size, NULL, 0) >= 0) {
1382+
if (sysctlbyname(sysctlkey, buf, &size, nullptr, 0) >= 0) {
13831383
st->print_cr("%s:%s", sysctlkey, buf);
13841384
}
13851385
}
13861386

13871387
static void print_sysctl_info_uint64(const char* sysctlkey, outputStream* st) {
13881388
uint64_t val;
13891389
size_t size=sizeof(uint64_t);
1390-
if (sysctlbyname(sysctlkey, &val, &size, NULL, 0) >= 0) {
1390+
if (sysctlbyname(sysctlkey, &val, &size, nullptr, 0) >= 0) {
13911391
st->print_cr("%s:%llu", sysctlkey, val);
13921392
}
13931393
}

src/hotspot/os/windows/os_windows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,7 @@ void os::pd_print_cpu_info(outputStream* st, char* buf, size_t buflen) {
19461946
}
19471947

19481948
size_t sz_check = sizeof(PROCESSOR_POWER_INFORMATION) * (size_t)proc_count;
1949-
NTSTATUS status = ::CallNtPowerInformation(ProcessorInformation, NULL, 0, buf, (ULONG) buflen);
1949+
NTSTATUS status = ::CallNtPowerInformation(ProcessorInformation, nullptr, 0, buf, (ULONG) buflen);
19501950
int max_mhz = -1, current_mhz = -1, mhz_limit = -1;
19511951
bool same_vals_for_all_cpus = true;
19521952

0 commit comments

Comments
 (0)