clang-tidy: Replace NULL with nullptr
Replaced all instances of NULL with nullptr to improve type safety
and clarity, as nullptr is the modern C++ standard for null pointers.
Tested: Build verified
Change-Id: If9e6c34c48821a7cf8577a2166727ce7db06fadc
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
diff --git a/libpldmresponder/platform.cpp b/libpldmresponder/platform.cpp
index b8ac0f6..2329213 100644
--- a/libpldmresponder/platform.cpp
+++ b/libpldmresponder/platform.cpp
@@ -241,7 +241,7 @@
{
pdr_utils::PdrEntry e;
auto record = pdr::getRecordByHandle(pdrRepo, recordHandle, e);
- if (record == NULL)
+ if (record == nullptr)
{
return CmdHandler::ccOnlyResponse(
request, PLDM_PLATFORM_INVALID_RECORD_HANDLE);
@@ -455,7 +455,7 @@
previousEventState);
// If there are no HOST PDR's, there is no further action
- if (hostPDRHandler == NULL)
+ if (hostPDRHandler == nullptr)
{
return PLDM_SUCCESS;
}
@@ -866,7 +866,7 @@
while (pdrRecord)
{
pdr = reinterpret_cast<pldm_state_sensor_pdr*>(pdrEntry.data);
- assert(pdr != NULL);
+ assert(pdr != nullptr);
if (pdr->sensor_id != sensorId)
{
pdr = nullptr;
@@ -938,7 +938,7 @@
while (pdrRecord)
{
pdr = reinterpret_cast<pldm_state_effecter_pdr*>(pdrEntry.data);
- assert(pdr != NULL);
+ assert(pdr != nullptr);
if (pdr->effecter_id != effecterId)
{
pdr = nullptr;