[style] replace NULL with nullptr (#5109)

This commit is contained in:
Jonathan Hui
2020-06-17 22:44:54 -07:00
committed by GitHub
parent 3b362071e5
commit 1326d64a64
209 changed files with 1981 additions and 1906 deletions
+6 -1
View File
@@ -64,7 +64,12 @@ add_library(openthread-cc1352
cxx_helpers.c
)
set_property(TARGET openthread-cc1352 PROPERTY C_STANDARD 99)
set_target_properties(
openthread-cc1352
PROPERTIES
C_STANDARD 99
CXX_STANDARD 11
)
target_link_libraries(openthread-cc1352
PUBLIC
+6 -1
View File
@@ -55,7 +55,12 @@ add_library(openthread-cc2538
$<TARGET_OBJECTS:openthread-platform-utils>
)
set_property(TARGET openthread-cc2538 PROPERTY C_STANDARD 99)
set_target_properties(
openthread-cc2538
PROPERTIES
C_STANDARD 99
CXX_STANDARD 11
)
target_link_libraries(openthread-cc2538 PRIVATE openthread-platform-utils ot-config)
target_link_options(openthread-cc2538 PUBLIC -T${PROJECT_SOURCE_DIR}/examples/platforms/cc2538/cc2538.ld)
+6 -1
View File
@@ -64,7 +64,12 @@ add_library(openthread-cc2650
$<TARGET_OBJECTS:openthread-platform-utils>
)
set_property(TARGET openthread-cc2650 PROPERTY C_STANDARD 99)
set_target_properties(
openthread-cc2650
PROPERTIES
C_STANDARD 99
CXX_STANDARD 11
)
target_link_libraries(openthread-cc2650
PUBLIC
+6 -1
View File
@@ -64,7 +64,12 @@ add_library(openthread-cc2652
uart.c
)
set_property(TARGET openthread-cc2652 PROPERTY C_STANDARD 99)
set_target_properties(
openthread-cc2652
PROPERTIES
C_STANDARD 99
CXX_STANDARD 11
)
target_link_libraries(openthread-cc2652
PUBLIC
+7 -1
View File
@@ -52,7 +52,13 @@ add_library(openthread-kw41z
uart.c
)
set_property(TARGET openthread-kw41z PROPERTY C_STANDARD 99)
set_target_properties(
openthread-kw41z
PROPERTIES
C_STANDARD 99
CXX_STANDARD 11
)
target_link_libraries(openthread-kw41z PRIVATE nxp-kw41z-driver ot-config)
target_link_options(openthread-kw41z PRIVATE -T${PROJECT_SOURCE_DIR}/examples/platforms/kw41z/MKW41Z512xxx4.ld)
target_link_options(openthread-kw41z PRIVATE -Wl,--gc-sections -Wl,-Map=$<TARGET_PROPERTY:NAME>.map)
+6 -1
View File
@@ -67,7 +67,12 @@ add_library(openthread-qpg6095
uart.c
)
set_property(TARGET openthread-qpg6095 PROPERTY C_STANDARD 99)
set_target_properties(
openthread-qpg6095
PROPERTIES
C_STANDARD 99
CXX_STANDARD 11
)
target_link_libraries(openthread-qpg6095
PRIVATE
+2 -2
View File
@@ -72,7 +72,7 @@ otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint
if (error == OT_ERROR_NOT_FOUND)
{
if (aValue != NULL)
if (aValue != nullptr)
{
*aValueLength = 0;
}
@@ -110,7 +110,7 @@ otError otPlatSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex)
otError error = OT_ERROR_NOT_FOUND;
OT_UNUSED_VARIABLE(aInstance);
if (otPlatSettingsGet(aInstance, aKey, 0, NULL, NULL) == OT_ERROR_NONE)
if (otPlatSettingsGet(aInstance, aKey, 0, nullptr, nullptr) == OT_ERROR_NONE)
{
qorvoSettingsDelete(aKey, aIndex);
error = OT_ERROR_NONE;
+6 -1
View File
@@ -60,7 +60,12 @@ add_library(openthread-samr21
uart.c
)
set_property(TARGET openthread-samr21 PROPERTY C_STANDARD 99)
set_target_properties(
openthread-samr21
PROPERTIES
C_STANDARD 99
CXX_STANDARD 11
)
if(OT_CFLAGS MATCHES "-pedantic-errors")
string(REPLACE "-pedantic-errors" "" OT_CFLAGS "${OT_CFLAGS}")
+6 -1
View File
@@ -71,7 +71,12 @@ add_library(openthread-simulation
$<TARGET_OBJECTS:openthread-platform-utils>
)
set_property(TARGET openthread-simulation PROPERTY C_STANDARD 99)
set_target_properties(
openthread-simulation
PROPERTIES
C_STANDARD 99
CXX_STANDARD 11
)
find_library(LIBRT rt)
if(LIBRT)
+7
View File
@@ -34,6 +34,13 @@ add_library(openthread-platform-utils OBJECT
soft_source_match_table.c
)
set_target_properties(
openthread-platform-utils
PROPERTIES
C_STANDARD 99
CXX_STANDARD 11
)
target_include_directories(openthread-platform-utils PRIVATE
${OT_PUBLIC_INCLUDES}
${PROJECT_SOURCE_DIR}/examples/platforms
+2 -2
View File
@@ -134,7 +134,7 @@ bool otMacFrameIsVersion2015(const otRadioFrame *aFrame)
void otMacFrameGenerateImmAck(const otRadioFrame *aFrame, bool aIsFramePending, otRadioFrame *aAckFrame)
{
assert(aFrame != NULL && aAckFrame != NULL);
assert(aFrame != nullptr && aAckFrame != nullptr);
static_cast<Mac::TxFrame *>(aAckFrame)->GenerateImmAck(*static_cast<const Mac::RxFrame *>(aFrame), aIsFramePending);
}
@@ -146,7 +146,7 @@ otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame,
uint8_t aIeLength,
otRadioFrame * aAckFrame)
{
assert(aFrame != NULL && aAckFrame != NULL);
assert(aFrame != nullptr && aAckFrame != nullptr);
return static_cast<Mac::TxFrame *>(aAckFrame)->GenerateEnhAck(*static_cast<const Mac::RxFrame *>(aFrame),
aIsFramePending, aIeData, aIeLength);