mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
Global: replaces NULL to nullptr
This commit is contained in:
@@ -76,6 +76,6 @@ const char* ffChassisTypeToString(uint32_t type) {
|
||||
case 0x24:
|
||||
return "Stick PC";
|
||||
default:
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ const char* ffDetectChassis(FFChassisResult* result) {
|
||||
.uuid = ffStrbufCreate(),
|
||||
.vendor = ffStrbufCreate(),
|
||||
};
|
||||
if (ffDetectHost(&host) != NULL) {
|
||||
if (ffDetectHost(&host) != nullptr) {
|
||||
return "Failed to detect host";
|
||||
}
|
||||
|
||||
@@ -36,5 +36,5 @@ const char* ffDetectChassis(FFChassisResult* result) {
|
||||
ffStrbufDestroy(&host.uuid);
|
||||
ffStrbufDestroy(&host.vendor);
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ const char* ffDetectChassis(FFChassisResult* result) {
|
||||
ffCleanUpSmbiosValue(&result->serial);
|
||||
ffSettingsGetFreeBSDKenv("smbios.chassis.version", &result->version);
|
||||
ffCleanUpSmbiosValue(&result->version);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -35,5 +35,5 @@ const char* ffDetectChassis(FFChassisResult* result) {
|
||||
result->type.chars[0] = (char) toupper(result->type.chars[0]);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
#include "common/smbios.h"
|
||||
|
||||
const char* ffDetectChassis(FFChassisResult* chassis) {
|
||||
if (ffSysctlGetString("machdep.dmi.chassis-type", &chassis->type) == NULL) {
|
||||
if (ffSysctlGetString("machdep.dmi.chassis-type", &chassis->type) == nullptr) {
|
||||
ffCleanUpSmbiosValue(&chassis->type);
|
||||
}
|
||||
if (ffSysctlGetString("machdep.dmi.chassis-version", &chassis->version) == NULL) {
|
||||
if (ffSysctlGetString("machdep.dmi.chassis-version", &chassis->version) == nullptr) {
|
||||
ffCleanUpSmbiosValue(&chassis->version);
|
||||
}
|
||||
if (ffSysctlGetString("machdep.dmi.chassis-vendor", &chassis->vendor) == NULL) {
|
||||
if (ffSysctlGetString("machdep.dmi.chassis-vendor", &chassis->vendor) == nullptr) {
|
||||
ffCleanUpSmbiosValue(&chassis->vendor);
|
||||
}
|
||||
if (ffSysctlGetString("machdep.dmi.chassis-serial", &chassis->serial) == NULL) {
|
||||
if (ffSysctlGetString("machdep.dmi.chassis-serial", &chassis->serial) == nullptr) {
|
||||
ffCleanUpSmbiosValue(&chassis->serial);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -50,5 +50,5 @@ const char* ffDetectChassis(FFChassisResult* result) {
|
||||
ffCleanUpSmbiosValue(&result->version);
|
||||
ffStrbufSetStatic(&result->type, ffChassisTypeToString(data->Type));
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user