[style] clean up lingering NULL -> nullptr (#5373)

This commit is contained in:
Jonathan Hui
2020-08-10 14:28:07 -07:00
committed by GitHub
parent 376f35a49e
commit 6dddd555e4
7 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ otError otJoinerSetDiscerner(otInstance *aInstance, otJoinerDiscerner *aDiscerne
otError error = OT_ERROR_NONE;
MeshCoP::Joiner &joiner = static_cast<Instance *>(aInstance)->Get<MeshCoP::Joiner>();
if (aDiscerner != NULL)
if (aDiscerner != nullptr)
{
error = joiner.SetDiscerner(*static_cast<const MeshCoP::JoinerDiscerner *>(aDiscerner));
}
+1 -1
View File
@@ -73,7 +73,7 @@ public:
* Note: available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.
* Only used for test and certification.
*
* @param[in] aMlIid A pointer to the Mesh Local IID. If NULL, respond with @p aStatus for any
* @param[in] aMlIid A pointer to the Mesh Local IID. If nullptr, respond with @p aStatus for any
* coming DUA.req, otherwise only respond the one with matching @p aMlIid.
* @param[in] aStatus The status to respond.
*
+1 -1
View File
@@ -68,7 +68,7 @@ otError LinkRaw::SetReceiveDone(otLinkRawReceiveDone aCallback)
{
otError error = OT_ERROR_NONE;
otLogDebgMac("LinkRaw::Enabled(%s)", (aCallback != NULL ? "true" : "false"));
otLogDebgMac("LinkRaw::Enabled(%s)", (aCallback != nullptr ? "true" : "false"));
#if OPENTHREAD_MTD || OPENTHREAD_FTD
VerifyOrExit(!Get<ThreadNetif>().IsUp(), error = OT_ERROR_INVALID_STATE);
+3 -3
View File
@@ -71,13 +71,13 @@ public:
* @returns true if enabled, false otherwise.
*
*/
bool IsEnabled(void) const { return mReceiveDoneCallback != NULL; }
bool IsEnabled(void) const { return mReceiveDoneCallback != nullptr; }
/**
* This method enables/disables the raw link-layer.
*
* @param[in] aCallback A pointer to a function called on receipt of a IEEE 802.15.4 frame, NULL to disable
* raw link-layer.
* @param[in] aCallback A pointer to a function called on receipt of a IEEE 802.15.4 frame, nullptr to disable
* raw link-layer.
*
*
* @retval OT_ERROR_INVALID_STATE Thread stack is enabled.
+2 -2
View File
@@ -615,7 +615,7 @@ otError DuaManager::ProcessDuaResponse(Coap::Message &aMessage)
{
Child *child = Get<ChildTable>().GetChildAtIndex(mChildIndexDuaRegistering);
VerifyOrExit(child != NULL, error = OT_ERROR_NOT_FOUND);
VerifyOrExit(child != nullptr, error = OT_ERROR_NOT_FOUND);
VerifyOrExit(child->HasIp6Address(target), error = OT_ERROR_NOT_FOUND);
mRegisterCurrentChildIndex = false;
@@ -684,7 +684,7 @@ exit:
otLogWarnDua("Sent ADDR_NTF for child %04x DUA %s Error %s", aChild.GetRloc16(),
aAddress.ToString().AsCString(), otThreadErrorToString(error));
if (message != NULL)
if (message != nullptr)
{
message->Free();
}
+1 -1
View File
@@ -348,7 +348,7 @@ template <> otError NcpBase::HandlePropertySet<SPINEL_PROP_PHY_ENABLED>(void)
if (value == false)
{
error = otLinkRawSetReceiveDone(mInstance, NULL);
error = otLinkRawSetReceiveDone(mInstance, nullptr);
}
else
{
+3 -3
View File
@@ -113,7 +113,7 @@ void platformAlarmInit(uint32_t aSpeedUpFactor, int aRealTimeSignal)
sa.sa_sigaction = microTimerHandler;
sigemptyset(&sa.sa_mask);
VerifyOrDie(sigaction(aRealTimeSignal, &sa, NULL) != -1, OT_EXIT_ERROR_ERRNO);
VerifyOrDie(sigaction(aRealTimeSignal, &sa, nullptr) != -1, OT_EXIT_ERROR_ERRNO);
sev.sigev_notify = SIGEV_SIGNAL;
sev.sigev_signo = aRealTimeSignal;
@@ -176,7 +176,7 @@ void otPlatAlarmMicroStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
its.it_interval.tv_sec = 0;
its.it_interval.tv_nsec = 0;
if (-1 == timer_settime(sMicroTimer, 0, &its, NULL))
if (-1 == timer_settime(sMicroTimer, 0, &its, nullptr))
{
otLogWarnPlat("Failed to update microsecond timer: %s", strerror(errno));
}
@@ -195,7 +195,7 @@ void otPlatAlarmMicroStop(otInstance *aInstance)
{
struct itimerspec its = {{0, 0}, {0, 0}};
if (-1 == timer_settime(sMicroTimer, 0, &its, NULL))
if (-1 == timer_settime(sMicroTimer, 0, &its, nullptr))
{
otLogWarnPlat("Failed to stop microsecond timer: %s", strerror(errno));
}