summaryrefslogtreecommitdiffhomepage
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 156b025..f1143c5 100644
--- a/utils.c
+++ b/utils.c
@@ -119,6 +119,17 @@ vlist_simple_flush(struct vlist_simple_tree *tree)
}
void
+vlist_simple_replace(struct vlist_simple_tree *dest, struct vlist_simple_tree *old)
+{
+ struct vlist_simple_node *n, *tmp;
+
+ list_for_each_entry_safe(n, tmp, &old->list, list) {
+ list_del(&n->list);
+ vlist_simple_add(dest, n);
+ }
+}
+
+void
vlist_simple_flush_all(struct vlist_simple_tree *tree)
{
tree->version = -1;