summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/list.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/list.c b/src/lib/list.c
index 908d3b71..01fdf6e3 100644
--- a/src/lib/list.c
+++ b/src/lib/list.c
@@ -70,3 +70,14 @@ bool list_is_empty(struct list_head * h)
{
return h->nxt == h;
}
+
+void list_move(struct list_head * dst,
+ struct list_head * src)
+{
+ dst->nxt = src->nxt;
+ dst->prv = src->prv;
+ dst->nxt->prv = src->nxt->prv;
+ dst->prv->nxt = src->prv->nxt;
+
+ list_head_init(src);
+}