summaryrefslogtreecommitdiff
path: root/test/tree2.c
diff options
context:
space:
mode:
authorAndrew Sidwell <andy@entai.co.uk>2008-07-10 13:42:43 +0000
committerAndrew Sidwell <andy@entai.co.uk>2008-07-10 13:42:43 +0000
commitd354b2d78f226b370fd6720ff84aa43bfa4d930d (patch)
tree0b2f5abebe9903f394df5c368d33c01fac7ca67b /test/tree2.c
parent0438fcc8b80bf080e2dcd7708d728adad1ba1e5f (diff)
downloadlibhubbub-d354b2d78f226b370fd6720ff84aa43bfa4d930d.tar.gz
libhubbub-d354b2d78f226b370fd6720ff84aa43bfa4d930d.tar.bz2
- Handle in_table_foster for element insertion (yet to do comment/character).
- Fix test harness's insert_before() method. - Foster parenting now correctly taints the current table. svn path=/trunk/hubbub/; revision=4568
Diffstat (limited to 'test/tree2.c')
-rw-r--r--test/tree2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/tree2.c b/test/tree2.c
index e5a1e94..a56304f 100644
--- a/test/tree2.c
+++ b/test/tree2.c
@@ -475,11 +475,13 @@ int insert_before(void *ctx, void *parent, void *child, void *ref_child,
tchild->next = tref;
tref->prev = tchild;
- if (tref->prev)
- tref->prev->next = tchild;
+ if (tchild->prev)
+ tchild->prev->next = tchild;
else
tparent->child = tchild;
+ *result = child;
+
return 0;
}