summaryrefslogtreecommitdiff
path: root/src/lib/list.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-03-28 08:38:05 +0000
committerdimitri staessens <dimitri.staessens@ugent.be>2017-03-28 08:38:05 +0000
commitba13c05b8b61365ff9e969c15affd2e1d52b76ed (patch)
treebaa5d6178914dd12106845ca81c81b63e4249c6f /src/lib/list.c
parent7ee6dadd39f3d4b5874d23bfcdcdd66eb195124e (diff)
parent6d080d9b9ee2e480717935e4ce94870fc87ea5f7 (diff)
downloadouroboros-ba13c05b8b61365ff9e969c15affd2e1d52b76ed.tar.gz
ouroboros-ba13c05b8b61365ff9e969c15affd2e1d52b76ed.zip
Merged in sandervrijders/ouroboros/be-upd-graph (pull request #426)
Be upd graph
Diffstat (limited to 'src/lib/list.c')
-rw-r--r--src/lib/list.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/list.c b/src/lib/list.c
index b6b4bbd2..d5aba058 100644
--- a/src/lib/list.c
+++ b/src/lib/list.c
@@ -71,13 +71,9 @@ bool list_is_empty(struct list_head * h)
return h->nxt == h;
}
-void list_move(struct list_head * dst,
- struct list_head * src)
+void list_move(struct list_head * n,
+ struct list_head * h)
{
- dst->nxt = src->nxt;
- dst->prv = src->prv;
- dst->nxt->prv = src->nxt->prv;
- dst->prv->nxt = src->prv->nxt;
-
- list_head_init(src);
+ del_list(n->prv, n->nxt);
+ add_list(n, h, h->nxt);
}