mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 23:57:47 +00:00
[clang-tidy] modernize-use-nullptr (#5715)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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++)
|
||||
{
|
||||
|
||||
@@ -92,8 +92,8 @@ public:
|
||||
*
|
||||
*/
|
||||
WritePosition(void)
|
||||
: mPosition(0)
|
||||
, mSegmentHead(0)
|
||||
: mPosition(nullptr)
|
||||
, mSegmentHead(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -302,7 +302,7 @@ otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance)
|
||||
}
|
||||
else
|
||||
{
|
||||
return (otRadioFrame *)0;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user