libosmocore/tests/it_q
Vadim Yanitskiy 9c972934f9 core: fix wrong logic in _osmo_it_q_dequeue()
If the given queue is empty, queue->list.next points to &queue->list.
Current implementation would call llist_del() on the queue's llist_head,
decrement queue->current_length (which will be 0), and return a pointer
to &queue->list to the caller.  This is completely wrong.

- Use the existing item_dequeue(), which does exactly what we need.
- Do not decrement the current_length if nothing was dequeued.
- Uncomment code in the unit test, we should not crash anymore.

Change-Id: I63094df73b166b549616c869ad908e9f4f7d46d1
Fixes: CID#336557
2023-12-09 15:23:11 +07:00
..
it_q_test.c core: fix wrong logic in _osmo_it_q_dequeue() 2023-12-09 15:23:11 +07:00
it_q_test.ok core: fix wrong logic in _osmo_it_q_dequeue() 2023-12-09 15:23:11 +07:00