]> git.ozlabs.org Git - ccan/commit
list: list_add_after and list_add_before functions
authorEric Wong <normalperson@yhbt.net>
Fri, 24 Oct 2014 22:02:28 +0000 (22:02 +0000)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 30 Mar 2015 06:46:32 +0000 (17:16 +1030)
commite4046df7898c233437c3ac9857371d6b1da97512
treeaad3d7b4f197957643edae660cdf28bb2b773125
parentc1bace5e7359b63a6fe5beab5e8c8faf9de794b6
list: list_add_after and list_add_before functions

These make it easy to add a new element before or after an
existing element in the middle of the list.

The existing list_add and list_add_tail functions are trivially
reimplemented on top of these new functions.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/list/list.h
ccan/list/test/run.c