Showing the changes to lib/timerqueue.c (1 of 1 file). Show all
Unified · Split
| @@ -80,8 +80,7 @@ bool timerqueue_del(struct timerqueue_head *head, struct timerqueue_node *node) · 79 unmodified lines | ||
| 80 | 80 | if (head->next == node) { |
| 81 | 81 | struct rb_node *rbn = rb_next(&node->node); |
| 82 | 82 | |
| 83 | − head->next = rbn ? | |
| 84 | − rb_entry(rbn, struct timerqueue_node, node) : NULL; | |
| 83 | + head->next = rb_entry_safe(rbn, struct timerqueue_node, node); | |
| 85 | 84 | } |
| 86 | 85 | rb_erase(&node->node, &head->head); |
| 87 | 86 | RB_CLEAR_NODE(&node->node); |