mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 00:37:23 +01:00
Global: replaces NULL to nullptr
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user