Skip to content

Commit

Permalink
Rework event->pool_index_plus_one update in am_event_allocate_x()
Browse files Browse the repository at this point in the history
  • Loading branch information
adel-mamin committed Feb 7, 2025
1 parent 4904ef9 commit f906e28
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/event/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ struct am_event *am_event_allocate_x(int id, int size, int margin) {
memset(event, 0, sizeof(*event));
event->id = id;
event->pool_index_plus_one =
(unsigned)i & ((1U << AM_EVENT_POOL_INDEX_BITS) - 1);
event->pool_index_plus_one += 1;
(unsigned)(i + 1) & AM_EVENT_POOL_INDEX_MASK;

return event;
}
Expand Down

0 comments on commit f906e28

Please sign in to comment.