xtimer: Fixed _add_timer_to_long_list since timer could be added at the wrong position.
Signed-off-by: malo <malo@25cmsquare.io>
This commit is contained in:
parent
93eb56c612
commit
9b8fe52d5d
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user