[clang-tidy] modernize-use-nullptr (#5715)

This commit is contained in:
Jonathan Hui
2020-10-27 11:39:35 -07:00
committed by GitHub
parent b69275f450
commit 81688a0447
6 changed files with 8 additions and 5 deletions
+2
View File
@@ -826,6 +826,7 @@ static inline otError otCoapSendRequest(otInstance * aInstance,
otCoapResponseHandler aHandler,
void * aContext)
{
// NOLINTNEXTLINE(modernize-use-nullptr)
return otCoapSendRequestWithParameters(aInstance, aMessage, aMessageInfo, aHandler, aContext, NULL);
}
@@ -909,6 +910,7 @@ otError otCoapSendResponseWithParameters(otInstance * aInstance,
*/
static inline otError otCoapSendResponse(otInstance *aInstance, otMessage *aMessage, const otMessageInfo *aMessageInfo)
{
// NOLINTNEXTLINE(modernize-use-nullptr)
return otCoapSendResponseWithParameters(aInstance, aMessage, aMessageInfo, NULL);
}
+1 -1
View File
@@ -53,7 +53,7 @@ extern "C" {
* @note This number versions both OpenThread platform and user APIs.
*
*/
#define OPENTHREAD_API_VERSION (38)
#define OPENTHREAD_API_VERSION (39)
/**
* @addtogroup api-instance
+1
View File
@@ -117,6 +117,7 @@ readonly OT_CLANG_TIDY_BUILD_OPTS=(
readonly OT_CLANG_TIDY_CHECKS="\
-*,\
modernize-use-bool-literals,\
modernize-use-nullptr,\
readability-make-member-function-const,\
"
+1 -1
View File
@@ -3701,7 +3701,7 @@ otError Interpreter::ProcessUnsecurePort(uint8_t aArgsLength, char *aArgs[])
ports = otIp6GetUnsecurePorts(mInstance, &numPorts);
if (ports != NULL)
if (ports != nullptr)
{
for (uint8_t i = 0; i < numPorts; i++)
{
+2 -2
View File
@@ -92,8 +92,8 @@ public:
*
*/
WritePosition(void)
: mPosition(0)
, mSegmentHead(0)
: mPosition(nullptr)
, mSegmentHead(nullptr)
{
}
+1 -1
View File
@@ -302,7 +302,7 @@ otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance)
}
else
{
return (otRadioFrame *)0;
return nullptr;
}
}