for (unsigned char i = 0; t == -1 && i < TASK_COUNT; i++) {
if (bit_get(ids, _task_bitno))
t = _task_bitno;
- _task_bitno = (_task_bitno + 1) % TASK_COUNT;
+ if (++_task_bitno == TASK_COUNT)
+ _task_bitno = 0;
}
}
#if 0 /* Not until we have a crystal and can wake from sleep via tmr module */