Replace all occurrences of NULL with NULLPTR for unified C and C++ null pointer handling
Some checks failed
Builds / ExectOS (amd64, release) (push) Failing after 24s
Builds / ExectOS (amd64, debug) (push) Successful in 27s
Builds / ExectOS (i686, debug) (push) Successful in 27s
Builds / ExectOS (i686, release) (push) Failing after 25s

This commit is contained in:
2025-09-16 15:59:56 +02:00
parent ba9e5b1b88
commit fabf3a3a5e
46 changed files with 294 additions and 288 deletions

View File

@@ -144,7 +144,7 @@ BlGetConfigurationTable(IN PEFI_GUID TableGuid,
}
/* Table not found */
*Table = NULL;
*Table = NULLPTR;
return STATUS_EFI_NOT_FOUND;
}
@@ -184,7 +184,7 @@ BlGetEfiVariable(IN PEFI_GUID Vendor,
}
/* Attempt to get variable value */
Status = EfiSystemTable->RuntimeServices->GetVariable(VariableName, Vendor, NULL, &Size, Buffer);
Status = EfiSystemTable->RuntimeServices->GetVariable(VariableName, Vendor, NULLPTR, &Size, Buffer);
if(Status != STATUS_EFI_SUCCESS)
{
/* Failed to get variable, probably not found such one */
@@ -239,12 +239,12 @@ BlGetSecureBootStatus()
Size = sizeof(VarValue);
if(EfiSystemTable->RuntimeServices->GetVariable(L"SecureBoot", &VarGuid,
NULL, &Size, &VarValue) == STATUS_EFI_SUCCESS)
NULLPTR, &Size, &VarValue) == STATUS_EFI_SUCCESS)
{
SecureBootStatus = (INT_PTR)VarValue;
if((EfiSystemTable->RuntimeServices->GetVariable(L"SetupMode", &VarGuid,
NULL, &Size, &VarValue) == STATUS_EFI_SUCCESS) && VarValue != 0)
NULLPTR, &Size, &VarValue) == STATUS_EFI_SUCCESS) && VarValue != 0)
{
SecureBootStatus = -1;
}
@@ -274,11 +274,11 @@ BlInitializeEntropy(PULONGLONG RNGBuffer)
ULONGLONG Seed;
/* Initialize variables */
Rng = NULL;
Rng = NULLPTR;
Seed = 0;
/* Locate RNG protocol */
Status = EfiSystemTable->BootServices->LocateProtocol(&RngGuid, NULL, (PVOID *)&Rng);
Status = EfiSystemTable->BootServices->LocateProtocol(&RngGuid, NULLPTR, (PVOID *)&Rng);
if(Status != STATUS_EFI_SUCCESS)
{
/* Failed to locate RNG protocol, return status code */
@@ -286,7 +286,7 @@ BlInitializeEntropy(PULONGLONG RNGBuffer)
}
/* Get RNG value using the default algorithm */
Status = Rng->GetRNG(Rng, NULL, 8, (PUCHAR)&Seed);
Status = Rng->GetRNG(Rng, NULLPTR, 8, (PUCHAR)&Seed);
if(Status != STATUS_EFI_SUCCESS)
{
/* Failed to get RNG value, return status code */
@@ -340,7 +340,7 @@ EFI_STATUS
BlRebootSystem()
{
/* Reboot machine */
return EfiSystemTable->RuntimeServices->ResetSystem(EfiResetCold, STATUS_EFI_SUCCESS, 0, NULL);
return EfiSystemTable->RuntimeServices->ResetSystem(EfiResetCold, STATUS_EFI_SUCCESS, 0, NULLPTR);
}
/**
@@ -388,7 +388,7 @@ EFI_STATUS
BlShutdownSystem()
{
/* Shutdown machine */
return EfiSystemTable->RuntimeServices->ResetSystem(EfiResetShutdown, STATUS_EFI_SUCCESS, 0, NULL);
return EfiSystemTable->RuntimeServices->ResetSystem(EfiResetShutdown, STATUS_EFI_SUCCESS, 0, NULLPTR);
}
/**
@@ -422,7 +422,7 @@ XTCDECL
EFI_STATUS
BlStartEfiImage(IN EFI_HANDLE ImageHandle)
{
return EfiSystemTable->BootServices->StartImage(ImageHandle, NULL, NULL);
return EfiSystemTable->BootServices->StartImage(ImageHandle, NULLPTR, NULLPTR);
}
/**