mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Global: replaces NULL to nullptr
This commit is contained in:
@@ -12,5 +12,5 @@ const char* ffDetectBios(FFBiosResult* bios) {
|
||||
|
||||
ffStrbufSetStatic(&bios->type, "Bootloader");
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ const char* ffDetectBios(FFBiosResult* bios) {
|
||||
return "IODeviceTree:/rom not found";
|
||||
}
|
||||
|
||||
FF_CFTYPE_AUTO_RELEASE CFMutableDictionaryRef deviceRomProps = NULL;
|
||||
FF_CFTYPE_AUTO_RELEASE CFMutableDictionaryRef deviceRomProps = nullptr;
|
||||
if (IORegistryEntryCreateCFProperties(deviceRom, &deviceRomProps, kCFAllocatorDefault, kNilOptions) != kIOReturnSuccess) {
|
||||
return "IORegistryEntryCreateCFProperties(deviceRom) failed";
|
||||
}
|
||||
@@ -54,5 +54,5 @@ const char* ffDetectBios(FFBiosResult* bios) {
|
||||
}
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -27,5 +27,5 @@ const char* ffDetectBios(FFBiosResult* result) {
|
||||
: "BIOS");
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -17,5 +17,5 @@ const char* ffDetectBios(FFBiosResult* bios) {
|
||||
} else {
|
||||
ffStrbufSetStatic(&bios->type, "BIOS");
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
#include "common/io.h"
|
||||
|
||||
const char* ffDetectBios(FFBiosResult* bios) {
|
||||
if (ffSysctlGetString("machdep.dmi.bios-date", &bios->date) == NULL) {
|
||||
if (ffSysctlGetString("machdep.dmi.bios-date", &bios->date) == nullptr) {
|
||||
ffCleanUpSmbiosValue(&bios->date);
|
||||
}
|
||||
if (ffSysctlGetString("machdep.dmi.bios-version", &bios->version) == NULL) {
|
||||
if (ffSysctlGetString("machdep.dmi.bios-version", &bios->version) == nullptr) {
|
||||
ffCleanUpSmbiosValue(&bios->version);
|
||||
}
|
||||
if (ffSysctlGetString("machdep.dmi.bios-vendor", &bios->vendor) == NULL) {
|
||||
if (ffSysctlGetString("machdep.dmi.bios-vendor", &bios->vendor) == nullptr) {
|
||||
ffCleanUpSmbiosValue(&bios->vendor);
|
||||
}
|
||||
if (ffSysctlGetString("machdep.bootmethod", &bios->type) != NULL) {
|
||||
if (ffSysctlGetString("machdep.bootmethod", &bios->type) != nullptr) {
|
||||
ffStrbufSetStatic(&bios->type, ffPathExists("/dev/efi", FF_PATHTYPE_FILE) ? "UEFI" : "BIOS");
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ const char* ffDetectBios(FFBiosResult* bios) {
|
||||
// Same as GetFirmwareType, but support (?) Windows 7
|
||||
// https://ntdoc.m417z.com/system_information_class
|
||||
SYSTEM_BOOT_ENVIRONMENT_INFORMATION sbei;
|
||||
if (NT_SUCCESS(NtQuerySystemInformation(SystemBootEnvironmentInformation, &sbei, sizeof(sbei), NULL))) {
|
||||
if (NT_SUCCESS(NtQuerySystemInformation(SystemBootEnvironmentInformation, &sbei, sizeof(sbei), nullptr))) {
|
||||
switch (sbei.FirmwareType) {
|
||||
case FirmwareTypeBios:
|
||||
ffStrbufSetStatic(&bios->type, "BIOS");
|
||||
@@ -86,7 +86,7 @@ const char* ffDetectBios(FFBiosResult* bios) {
|
||||
#elif __sun
|
||||
di_node_t rootNode = di_init("/", DINFOPROP);
|
||||
if (rootNode != DI_NODE_NIL) {
|
||||
char* efiVersion = NULL;
|
||||
char* efiVersion = nullptr;
|
||||
if (di_prop_lookup_strings(DDI_DEV_T_ANY, rootNode, "efi-version", &efiVersion) > 0) {
|
||||
ffStrbufSetStatic(&bios->type, "UEFI");
|
||||
} else {
|
||||
@@ -103,5 +103,5 @@ const char* ffDetectBios(FFBiosResult* bios) {
|
||||
ffStrbufSetStatic(&bios->type, deviceEfi ? "UEFI" : "BIOS");
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user