Skip to content

Commit 469d15e

Browse files
committed
src:arduino-timer: use task_id in cancel
Use task_id in cancel to simplify the check and remove the confusing cast.
1 parent 58b4908 commit 469d15e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/arduino-timer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Timer {
9494
if (!task) return;
9595

9696
timer_foreach_task(t) {
97-
if (t->handler && (t->id ^ task) == (uintptr_t)t) {
97+
if (t->handler && task_id(t) == task) {
9898
remove(t);
9999
break;
100100
}

0 commit comments

Comments
 (0)