mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-01 00:22:02 +03:00
make list_move consistent with other list fns
This commit is contained in:
@ -65,6 +65,15 @@ void list_del(struct list *elem)
|
||||
elem->p->n = elem->n;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove an element from existing list and insert before 'head'.
|
||||
*/
|
||||
void list_move(struct list *head, struct list *elem)
|
||||
{
|
||||
list_del(elem);
|
||||
list_add(head, elem);
|
||||
}
|
||||
|
||||
/*
|
||||
* Is the list empty?
|
||||
*/
|
||||
|
@ -55,14 +55,9 @@ void list_add_h(struct list *head, struct list *elem);
|
||||
void list_del(struct list *elem);
|
||||
|
||||
/*
|
||||
* Move an element from an existing list to list 'head'.
|
||||
* Insert the element before 'head'.
|
||||
* Remove an element from existing list and insert before 'head'.
|
||||
*/
|
||||
static inline void list_move(struct list *item, struct list *head)
|
||||
{
|
||||
list_del(item);
|
||||
list_add(head, item);
|
||||
}
|
||||
void list_move(struct list *head, struct list *elem);
|
||||
|
||||
/*
|
||||
* Is the list empty?
|
||||
|
Reference in New Issue
Block a user