Global: replaces NULL to nullptr
This commit is contained in:
1 parent
873454191f
commit
ba18705d2e
387 files changed
+2411
-2411
No files matched your search
@@ -18,12 +18,12 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes) {
|
||||
#else
|
||||
int ctls[] = { CTL_KERN, KERN_CP_TIME };
|
||||
#endif
|
||||
if (sysctl(ctls, 2, NULL, &neededLength, NULL, 0) != 0) {
|
||||
return "sysctl({CTL_KERN, KERN_CPTIME}, 2, NULL) failed";
|
||||
if (sysctl(ctls, 2, nullptr, &neededLength, nullptr, 0) != 0) {
|
||||
return "sysctl({CTL_KERN, KERN_CPTIME}, 2, nullptr) failed";
|
||||
}
|
||||
#else
|
||||
if (sysctlbyname("kern.cp_times", NULL, &neededLength, NULL, 0) != 0) {
|
||||
return "sysctlbyname(kern.cp_times, NULL) failed";
|
||||
if (sysctlbyname("kern.cp_times", nullptr, &neededLength, nullptr, 0) != 0) {
|
||||
return "sysctlbyname(kern.cp_times, nullptr) failed";
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -33,11 +33,11 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes) {
|
||||
FF_AUTO_FREE uint64_t (*cpTimes)[CPUSTATES] = malloc(neededLength);
|
||||
|
||||
#if __OpenBSD__ || __NetBSD__
|
||||
if (sysctl(ctls, 2, cpTimes, &neededLength, NULL, 0) != 0) {
|
||||
return "sysctl({CTL_KERN, KERN_CPTIME}, 2, NULL) failed";
|
||||
if (sysctl(ctls, 2, cpTimes, &neededLength, nullptr, 0) != 0) {
|
||||
return "sysctl({CTL_KERN, KERN_CPTIME}, 2, nullptr) failed";
|
||||
}
|
||||
#else
|
||||
if (sysctlbyname("kern.cp_times", cpTimes, &neededLength, NULL, 0) != 0) {
|
||||
if (sysctlbyname("kern.cp_times", cpTimes, &neededLength, nullptr, 0) != 0) {
|
||||
return "sysctlbyname(kern.cp_times, cpTime) failed";
|
||||
}
|
||||
#endif
|
||||
@@ -54,5 +54,5 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes) {
|
||||
};
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
Reference in new issue
Block a user