]> wimlib.net Git - wimlib/blobdiff - include/wimlib/list.h
Improve handling of invalid filenames
[wimlib] / include / wimlib / list.h
index ff4074286fb3659600734f255019854d05a19851..8541d45d1a426603cb328e04dd298fd6401bdbaf 100644 (file)
@@ -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.