Skip to content

Commit

Permalink
Orchestra: add NULL checks into new_time_source (eb-per-time-source)
Browse files Browse the repository at this point in the history
  • Loading branch information
yatch committed May 21, 2016
1 parent c7694e4 commit bc54f8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/orchestra/orchestra-rule-eb-per-time-source.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bc54f8b

Please sign in to comment.