Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
xtimer: Fixed _add_timer_to_long_list since timer could be added at t…
…he wrong position.

Signed-off-by: malo <malo@25cmsquare.io>
  • Loading branch information
malosek committed Feb 26, 2016
1 parent 93eb56c commit 9b8fe52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sys/xtimer/xtimer_core.c
Expand Up @@ -217,8 +217,8 @@ static void _add_timer_to_list(xtimer_t **list_head, xtimer_t *timer)
static void _add_timer_to_long_list(xtimer_t **list_head, xtimer_t *timer)
{
while (*list_head
&& (*list_head)->long_target <= timer->long_target
&& (*list_head)->target <= timer->target) {
&& (((*list_head)->long_target < timer->long_target)
|| (((*list_head)->long_target == timer->long_target) && ((*list_head)->target <= timer->target)))) {
list_head = &((*list_head)->next);
}

Expand Down

0 comments on commit 9b8fe52

Please sign in to comment.