Skip to content

Commit 221f346

Browse files
committed
8303047: avoid NULL after 8301661
Reviewed-by: mdoerr, kbarrett, dholmes
1 parent 23e9d9d commit 221f346

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
@@ -1301,15 +1301,15 @@ void os::print_os_info(outputStream* st) {
13011301

13021302
#ifdef __APPLE__
13031303
static void print_sysctl_info_string(const char* sysctlkey, outputStream* st, char* buf, size_t size) {
1304-
if (sysctlbyname(sysctlkey, buf, &size, NULL, 0) >= 0) {
1304+
if (sysctlbyname(sysctlkey, buf, &size, nullptr, 0) >= 0) {
13051305
st->print_cr("%s:%s", sysctlkey, buf);
13061306
}
13071307
}
13081308

13091309
static void print_sysctl_info_uint64(const char* sysctlkey, outputStream* st) {
13101310
uint64_t val;
13111311
size_t size=sizeof(uint64_t);
1312-
if (sysctlbyname(sysctlkey, &val, &size, NULL, 0) >= 0) {
1312+
if (sysctlbyname(sysctlkey, &val, &size, nullptr, 0) >= 0) {
13131313
st->print_cr("%s:%llu", sysctlkey, val);
13141314
}
13151315
}

src/hotspot/os/windows/os_windows.cpp

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

18991899
size_t sz_check = sizeof(PROCESSOR_POWER_INFORMATION) * (size_t)proc_count;
1900-
NTSTATUS status = ::CallNtPowerInformation(ProcessorInformation, NULL, 0, buf, (ULONG) buflen);
1900+
NTSTATUS status = ::CallNtPowerInformation(ProcessorInformation, nullptr, 0, buf, (ULONG) buflen);
19011901
int max_mhz = -1, current_mhz = -1, mhz_limit = -1;
19021902
bool same_vals_for_all_cpus = true;
19031903

0 commit comments

Comments
 (0)