X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Flist.h;h=8541d45d1a426603cb328e04dd298fd6401bdbaf;hp=ff4074286fb3659600734f255019854d05a19851;hb=d55cda59032e0abe5f71cd6f16ade943d2713fee;hpb=694f1955dc495b72a3232bf870e9839bdeb9bff9;ds=sidebyside diff --git a/include/wimlib/list.h b/include/wimlib/list.h index ff407428..8541d45d 100644 --- a/include/wimlib/list.h +++ b/include/wimlib/list.h @@ -110,6 +110,16 @@ static inline void list_del(struct list_head *entry) __list_del(entry->prev, entry->next); } +/** + * list_del_init - deletes entry from list and reinitialize it. + * @entry: the element to delete from the list. + */ +static inline void list_del_init(struct list_head *entry) +{ + list_del(entry); + INIT_LIST_HEAD(entry); +} + /** * list_empty - tests whether a list is empty * @head: the list to test.