Replace all occurrences of NULL with NULLPTR for unified C and C++ null pointer handling
This commit is contained in:
@@ -99,7 +99,8 @@ KE::KernelInit::StartKernel(VOID)
|
||||
CurrentProcess->Quantum = MAXCHAR;
|
||||
|
||||
/* Initialize Idle thread */
|
||||
KThread::InitializeThread(CurrentProcess, CurrentThread, nullptr, nullptr, nullptr, nullptr, nullptr, AR::ProcSup::GetBootStack(), TRUE);
|
||||
KThread::InitializeThread(CurrentProcess, CurrentThread, NULLPTR, NULLPTR, NULLPTR,
|
||||
NULLPTR, NULLPTR, AR::ProcSup::GetBootStack(), TRUE);
|
||||
CurrentThread->NextProcessor = Prcb->CpuNumber;
|
||||
CurrentThread->Priority = THREAD_HIGH_PRIORITY;
|
||||
CurrentThread->State = Running;
|
||||
|
@@ -99,7 +99,7 @@ KE::KThread::InitializeThreadContext(IN PKTHREAD Thread,
|
||||
Thread->NpxState = NPX_STATE_UNUSED;
|
||||
|
||||
/* Set thread start address */
|
||||
ThreadFrame->StartFrame.Return = (ULONG64)NULL;
|
||||
ThreadFrame->StartFrame.Return = (ULONG64)NULLPTR;
|
||||
}
|
||||
|
||||
/* Initialize thread startup information */
|
||||
|
@@ -83,7 +83,7 @@ KE::Apc::InitializeApc(IN PKAPC Apc,
|
||||
{
|
||||
/* Set context and mode for special APC */
|
||||
Apc->ApcMode = KernelMode;
|
||||
Apc->NormalContext = NULL;
|
||||
Apc->NormalContext = NULLPTR;
|
||||
}
|
||||
|
||||
/* Mark APC as not inserted yet */
|
||||
|
@@ -44,7 +44,7 @@ KE::BootInformation::GetFirmwareType(VOID)
|
||||
* Supplies a pointer to a null-terminated wide string specifying the name of the parameter to search for.
|
||||
*
|
||||
* @param Parameter
|
||||
* Supplies a pointer to a variable that receives a pointer to the matching parameter, or NULL if not found.
|
||||
* Supplies a pointer to a variable that receives a pointer to the matching parameter, or NULLPTR if not found.
|
||||
*
|
||||
* @return This routine returns a status code.
|
||||
*
|
||||
@@ -74,7 +74,7 @@ KE::BootInformation::GetKernelParameter(IN PCWSTR ParameterName,
|
||||
}
|
||||
|
||||
/* Assume the requested parameter is not present in the kernel parameters */
|
||||
*Parameter = nullptr;
|
||||
*Parameter = NULLPTR;
|
||||
|
||||
/* Start searching from the beginning of the list */
|
||||
SearchStart = InitializationBlock->KernelParameters;
|
||||
|
@@ -39,7 +39,7 @@ KE::Dpc::InitializeDpc(IN PKDPC Dpc,
|
||||
/* Initialize DPC routine and context data */
|
||||
Dpc->DeferredContext = DpcContext;
|
||||
Dpc->DeferredRoutine = DpcRoutine;
|
||||
Dpc->DpcData = NULL;
|
||||
Dpc->DpcData = NULLPTR;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,7 +72,7 @@ KE::Dpc::InitializeThreadedDpc(IN PKDPC Dpc,
|
||||
/* Initialize DPC routine and context data */
|
||||
Dpc->DeferredContext = DpcContext;
|
||||
Dpc->DeferredRoutine = DpcRoutine;
|
||||
Dpc->DpcData = NULL;
|
||||
Dpc->DpcData = NULLPTR;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -99,7 +99,8 @@ KE::KernelInit::StartKernel(VOID)
|
||||
CurrentProcess->Quantum = MAXCHAR;
|
||||
|
||||
/* Initialize Idle thread */
|
||||
KThread::InitializeThread(CurrentProcess, CurrentThread, nullptr, nullptr, nullptr, nullptr, nullptr, AR::ProcSup::GetBootStack(), TRUE);
|
||||
KThread::InitializeThread(CurrentProcess, CurrentThread, NULLPTR, NULLPTR, NULLPTR,
|
||||
NULLPTR, NULLPTR, AR::ProcSup::GetBootStack(), TRUE);
|
||||
CurrentThread->NextProcessor = Prcb->CpuNumber;
|
||||
CurrentThread->Priority = THREAD_HIGH_PRIORITY;
|
||||
CurrentThread->State = Running;
|
||||
|
@@ -47,7 +47,7 @@ KeStartXtSystem(IN PKERNEL_INITIALIZATION_BLOCK Parameters)
|
||||
}
|
||||
|
||||
/* Initialize boot CPU */
|
||||
AR::ProcSup::InitializeProcessor(NULL);
|
||||
AR::ProcSup::InitializeProcessor(NULLPTR);
|
||||
|
||||
/* Initialize system resources */
|
||||
SystemResources::InitializeResources();
|
||||
|
@@ -131,7 +131,7 @@ KE::KThread::InitializeThread(IN PKPROCESS Process,
|
||||
|
||||
/* Initialize kernel-mode suspend APC */
|
||||
Apc::InitializeApc(&Thread->SuspendApc, Thread, OriginalApcEnvironment, SuspendNop,
|
||||
SuspendRundown, SuspendThread, KernelMode, NULL);
|
||||
SuspendRundown, SuspendThread, KernelMode, NULLPTR);
|
||||
|
||||
/* Initialize suspend semaphore */
|
||||
Semaphore::InitializeSemaphore(&Thread->SuspendSemaphore, 0, 2);
|
||||
@@ -179,8 +179,8 @@ KE::KThread::InitializeThread(IN PKPROCESS Process,
|
||||
{
|
||||
/* Deallocate stack */
|
||||
MM::KernelPool::FreeKernelStack(Stack, FALSE);
|
||||
Thread->InitialStack = NULL;
|
||||
Thread->StackBase = NULL;
|
||||
Thread->InitialStack = NULLPTR;
|
||||
Thread->StackBase = NULLPTR;
|
||||
}
|
||||
|
||||
/* Thread initialization failed */
|
||||
|
@@ -104,8 +104,8 @@ KE::SystemResources::GetSystemResource(IN SYSTEM_RESOURCE_TYPE ResourceType,
|
||||
/* Check if resource was found */
|
||||
if(ListEntry == &ResourcesListHead)
|
||||
{
|
||||
/* Resource not found, return NULL */
|
||||
Resource = nullptr;
|
||||
/* Resource not found, return NULLPTR */
|
||||
Resource = NULLPTR;
|
||||
Status = STATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user