mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
map: mark removed object as removed
Normally the invalid bit is set on the removed object by copying it from the free list. If there is no free list, also set the bit.
This commit is contained in:
parent
a37694fde5
commit
954da89756
1 changed files with 1 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ static inline bool pw_map_insert_at(struct pw_map *map, uint32_t id, void *data)
|
|||
*/
|
||||
static inline void pw_map_remove(struct pw_map *map, uint32_t id)
|
||||
{
|
||||
pw_map_get_item(map, id)->next = map->free_list;
|
||||
pw_map_get_item(map, id)->next = map->free_list | 1;
|
||||
map->free_list = (id << 1) | 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue