Repository navigation
list: added list_item_del_init - #303
Conversation
Added function that will delete and reinitialize list. Reinitialized lists show up as empty unlike deleted with list_item_del. Signed-off-by: Jakub Dabek <jakub.dabek@linux.intel.com>
|
@dabekjakub can you send PR for stable-1.2 too |
| static inline void list_item_del_init(struct list_item *item) | ||
| { | ||
| list_item_del(item); | ||
| list_init(item); |
There was a problem hiding this comment.
Here you init only the item not the list.
What do you mean by
and list_is_empty will return true
There was a problem hiding this comment.
Here you init only the item not the list.
Item and list are interchangable, depends on how you use it
and list_is_empty will return true
When you just del item it still has pointers pointing to items in list it's not part of. When you init item it's just like newly created item that is not part of any list and will return true for list_is_empty - it doesn't check for null it next but if next == 'this item'
|
@lgirdwood @dabekjakub |
|
@xiulipan pls send a PR |
|
@lgirdwood |
Added function that will delete and reinitialize list.
Reinitialized lists show up as empty unlike deleted with
list_item_del.
Signed-off-by: Jakub Dabek jakub.dabek@linux.intel.com