clang-tidy: Change NULL to nullptr
Change-Id: I3b33aca08785ceb90c15c5155c9bb13b04e95d4e
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/extensions/openpower-pels/fapi_data_process.cpp b/extensions/openpower-pels/fapi_data_process.cpp
index a7cd1b4..d57c9da 100644
--- a/extensions/openpower-pels/fapi_data_process.cpp
+++ b/extensions/openpower-pels/fapi_data_process.cpp
@@ -159,7 +159,7 @@
std::memcpy(&targetInfo.physBinPath, physBinPath.data(),
sizeof(targetInfo.physBinPath));
- int ret = pdbg_target_traverse(NULL, pdbgCallbackToGetTgtReqAttrsVal,
+ int ret = pdbg_target_traverse(nullptr, pdbgCallbackToGetTgtReqAttrsVal,
&targetInfo);
if (ret == 0)
{
diff --git a/extensions/openpower-pels/src.cpp b/extensions/openpower-pels/src.cpp
index cfa7155..cac9bf1 100644
--- a/extensions/openpower-pels/src.cpp
+++ b/extensions/openpower-pels/src.cpp
@@ -361,7 +361,7 @@
auto ss = additionalData.getValue("PEL_SUBSYSTEM");
if (ss)
{
- auto eventSubsystem = std::stoul(*ss, NULL, 16);
+ auto eventSubsystem = std::stoul(*ss, nullptr, 16);
std::string subsystem =
pv::getValue(eventSubsystem, pel_values::subsystemValues);
if (subsystem == "invalid")
@@ -429,7 +429,7 @@
{
if (ccinString.size() == ccinSize)
{
- ccin = std::stoi(ccinString, 0, 16);
+ ccin = std::stoi(ccinString, nullptr, 16);
}
}
catch (const std::exception& e)
diff --git a/extensions/openpower-pels/tools/peltool.cpp b/extensions/openpower-pels/tools/peltool.cpp
index 810223a..0e7ff8c 100644
--- a/extensions/openpower-pels/tools/peltool.cpp
+++ b/extensions/openpower-pels/tools/peltool.cpp
@@ -83,7 +83,7 @@
try
{
- auto tmp = std::stoul(token.substr(i, 2), 0, 16);
+ auto tmp = std::stoul(token.substr(i, 2), nullptr, 16);
bcdTime |= (static_cast<uint64_t>(tmp) << 56);
}
catch (const std::exception& err)
@@ -93,7 +93,7 @@
i += 2;
try
{
- auto tmp = std::stoul(token.substr(i, 2), 0, 16);
+ auto tmp = std::stoul(token.substr(i, 2), nullptr, 16);
bcdTime |= (static_cast<uint64_t>(tmp) << 48);
}
catch (const std::exception& err)
@@ -103,7 +103,7 @@
i += 2;
try
{
- auto tmp = std::stoul(token.substr(i, 2), 0, 16);
+ auto tmp = std::stoul(token.substr(i, 2), nullptr, 16);
bcdTime |= (static_cast<uint64_t>(tmp) << 40);
}
catch (const std::exception& err)
@@ -113,7 +113,7 @@
i += 2;
try
{
- auto tmp = std::stoul(token.substr(i, 2), 0, 16);
+ auto tmp = std::stoul(token.substr(i, 2), nullptr, 16);
bcdTime |= (static_cast<uint64_t>(tmp) << 32);
}
catch (const std::exception& err)
@@ -123,7 +123,7 @@
i += 2;
try
{
- auto tmp = std::stoul(token.substr(i, 2), 0, 16);
+ auto tmp = std::stoul(token.substr(i, 2), nullptr, 16);
bcdTime |= (tmp << 24);
}
catch (const std::exception& err)
@@ -133,7 +133,7 @@
i += 2;
try
{
- auto tmp = std::stoul(token.substr(i, 2), 0, 16);
+ auto tmp = std::stoul(token.substr(i, 2), nullptr, 16);
bcdTime |= (tmp << 16);
}
catch (const std::exception& err)
@@ -143,7 +143,7 @@
i += 2;
try
{
- auto tmp = std::stoul(token.substr(i, 2), 0, 16);
+ auto tmp = std::stoul(token.substr(i, 2), nullptr, 16);
bcdTime |= (tmp << 8);
}
catch (const std::exception& err)
@@ -153,7 +153,7 @@
i += 2;
try
{
- auto tmp = std::stoul(token.substr(i, 2), 0, 16);
+ auto tmp = std::stoul(token.substr(i, 2), nullptr, 16);
bcdTime |= tmp;
}
catch (const std::exception& err)
@@ -174,7 +174,7 @@
uint32_t num = 0;
try
{
- num = std::stoul(fileName.substr(fileName.find("_") + 1), 0, 16);
+ num = std::stoul(fileName.substr(fileName.find("_") + 1), nullptr, 16);
}
catch (const std::exception& err)
{
diff --git a/extensions/openpower-pels/user_header.cpp b/extensions/openpower-pels/user_header.cpp
index 1cce95c..a490da6 100644
--- a/extensions/openpower-pels/user_header.cpp
+++ b/extensions/openpower-pels/user_header.cpp
@@ -63,7 +63,7 @@
auto ss = additionalData.getValue("PEL_SUBSYSTEM");
if (ss)
{
- auto eventSubsystem = std::stoul(*ss, NULL, 16);
+ auto eventSubsystem = std::stoul(*ss, nullptr, 16);
std::string subsystemString =
pv::getValue(eventSubsystem, pel_values::subsystemValues);
if (subsystemString == "invalid")