mirror of https://github.com/ARMmbed/mbed-os.git
thread_mle_message_handler: fix null comparison.
Fixes Coverity issue about comparing nullptr.pull/11558/head
parent
76407bc654
commit
a60df639fe
|
@ -514,7 +514,7 @@ static void thread_parse_annoucement(protocol_interface_info_entry_t *cur, mle_m
|
||||||
channel_page = ptr[0];
|
channel_page = ptr[0];
|
||||||
channel = common_read_16_bit(&ptr[1]);
|
channel = common_read_16_bit(&ptr[1]);
|
||||||
|
|
||||||
if (linkConfiguration->timestamp == timestamp) {
|
if (linkConfiguration && linkConfiguration->timestamp == timestamp) {
|
||||||
// We received same timestamp
|
// We received same timestamp
|
||||||
tr_debug("Same timestamp");
|
tr_debug("Same timestamp");
|
||||||
return;
|
return;
|
||||||
|
@ -527,7 +527,7 @@ static void thread_parse_annoucement(protocol_interface_info_entry_t *cur, mle_m
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (linkConfiguration->timestamp > timestamp) {
|
if (linkConfiguration && linkConfiguration->timestamp > timestamp) {
|
||||||
// We received older time stamp we just announce back to originator channel
|
// We received older time stamp we just announce back to originator channel
|
||||||
thread_bootstrap_announce_send(cur, linkConfiguration->channel_page, linkConfiguration->rfChannel, linkConfiguration->panId, linkConfiguration->timestamp, channel);
|
thread_bootstrap_announce_send(cur, linkConfiguration->channel_page, linkConfiguration->rfChannel, linkConfiguration->panId, linkConfiguration->timestamp, channel);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue