diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-01-21 17:16:58 +0000 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-01-21 17:16:58 +0000 |
commit | 317821ca093f7c22e0bf1a9bb15e17c3c501e498 (patch) | |
tree | 819ed39b4cb7b1dd2fb82f62f516bb9fd24e8432 /src/lib/list.c | |
parent | a5b135e9f409d59668c52be9fac5d94dae8ebe94 (diff) | |
parent | 9c92dd66d5e7fab3a3e243abbad9a20b29891fee (diff) | |
download | ouroboros-317821ca093f7c22e0bf1a9bb15e17c3c501e498.tar.gz ouroboros-317821ca093f7c22e0bf1a9bb15e17c3c501e498.zip |
Merged in dstaesse/ouroboros/be-rib (pull request #350)
Be rib
Diffstat (limited to 'src/lib/list.c')
-rw-r--r-- | src/lib/list.c | 11 |
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); +} |