We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2eee72 commit 38780bdCopy full SHA for 38780bd
libs/ao/ao.c
@@ -217,14 +217,13 @@ void am_ao_unsubscribe(const struct am_ao *ao, int event) {
217
AM_ASSERT(me->aos[ao->prio.ao] == ao);
218
AM_ASSERT(me->sub);
219
220
- int ind = event - AM_EVT_USER;
221
int i = ao->prio.ao / 8;
222
223
me->crit_enter();
224
225
- unsigned list = me->sub[ind].list[i];
+ unsigned list = me->sub[event].list[i];
226
list &= ~(1U << (unsigned)(ao->prio.ao % 8));
227
- me->sub[ind].list[i] = (uint8_t)list;
+ me->sub[event].list[i] = (uint8_t)list;
228
229
me->crit_exit();
230
}
0 commit comments