Merge pull request #36 from yatch/pr-orchestra-add-null-checks
Add NULL checks into new_time_source of orchestra-rule-eb-per-time-source.c
This commit is contained in:
commit
0418ee7446
@ -74,8 +74,8 @@ select_packet(uint16_t *slotframe, uint16_t *timeslot)
|
||||
static void
|
||||
new_time_source(const struct tsch_neighbor *old, const struct tsch_neighbor *new)
|
||||
{
|
||||
uint16_t old_ts = get_node_timeslot(&old->addr);
|
||||
uint16_t new_ts = get_node_timeslot(&new->addr);
|
||||
uint16_t old_ts = old != NULL ? get_node_timeslot(&old->addr) : 0xffff;
|
||||
uint16_t new_ts = new != NULL ? get_node_timeslot(&new->addr) : 0xffff;
|
||||
|
||||
if(new_ts == old_ts) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user