mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8303047: avoid NULL after 8301661
Reviewed-by: mdoerr, kbarrett, dholmes
(cherry picked from commit 221f34634d)
This commit is contained in:
committed by
Vitaly Provodin
parent
55e42f436c
commit
a37e124669
@@ -1305,7 +1305,7 @@ void os::print_os_info(outputStream* st) {
|
||||
|
||||
#ifdef __APPLE__
|
||||
static void print_sysctl_info_string(const char* sysctlkey, outputStream* st, char* buf, size_t size) {
|
||||
if (sysctlbyname(sysctlkey, buf, &size, NULL, 0) >= 0) {
|
||||
if (sysctlbyname(sysctlkey, buf, &size, nullptr, 0) >= 0) {
|
||||
st->print_cr("%s:%s", sysctlkey, buf);
|
||||
}
|
||||
}
|
||||
@@ -1313,7 +1313,7 @@ static void print_sysctl_info_string(const char* sysctlkey, outputStream* st, ch
|
||||
static void print_sysctl_info_uint64(const char* sysctlkey, outputStream* st) {
|
||||
uint64_t val;
|
||||
size_t size=sizeof(uint64_t);
|
||||
if (sysctlbyname(sysctlkey, &val, &size, NULL, 0) >= 0) {
|
||||
if (sysctlbyname(sysctlkey, &val, &size, nullptr, 0) >= 0) {
|
||||
st->print_cr("%s:%llu", sysctlkey, val);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2109,7 +2109,7 @@ void os::pd_print_cpu_info(outputStream* st, char* buf, size_t buflen) {
|
||||
}
|
||||
|
||||
size_t sz_check = sizeof(PROCESSOR_POWER_INFORMATION) * (size_t)proc_count;
|
||||
NTSTATUS status = ::CallNtPowerInformation(ProcessorInformation, NULL, 0, buf, (ULONG) buflen);
|
||||
NTSTATUS status = ::CallNtPowerInformation(ProcessorInformation, nullptr, 0, buf, (ULONG) buflen);
|
||||
int max_mhz = -1, current_mhz = -1, mhz_limit = -1;
|
||||
bool same_vals_for_all_cpus = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user