Global: replaces NULL to nullptr

This commit is contained in:
李通洲
2026-07-10 18:08:04 +08:00
parent 873454191f
commit ba18705d2e
387 changed files with 2411 additions and 2411 deletions
+4 -4
View File
@@ -8,14 +8,14 @@
const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options) {
int mib[] = { CTL_HW, HW_DISKSTATS };
size_t len;
if (sysctl(mib, ARRAY_SIZE(mib), NULL, &len, NULL, 0) < 0) {
return "sysctl({HW_DISKSTATS}, NULL) failed";
if (sysctl(mib, ARRAY_SIZE(mib), nullptr, &len, nullptr, 0) < 0) {
return "sysctl({HW_DISKSTATS}, nullptr) failed";
}
uint32_t nDrive = (uint32_t) (len / sizeof(struct diskstats));
FF_AUTO_FREE struct diskstats* stats = malloc(len);
if (sysctl(mib, ARRAY_SIZE(mib), stats, &len, NULL, 0) < 0) {
if (sysctl(mib, ARRAY_SIZE(mib), stats, &len, nullptr, 0) < 0) {
return "sysctl({HW_DISKSTATS}, stats) failed";
}
@@ -35,5 +35,5 @@ const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options) {
device->writeCount = st->ds_wxfer;
}
return NULL;
return nullptr;
}