From d354b2d78f226b370fd6720ff84aa43bfa4d930d Mon Sep 17 00:00:00 2001 From: Andrew Sidwell Date: Thu, 10 Jul 2008 13:42:43 +0000 Subject: - 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 --- test/tree2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') 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; } -- cgit v1.2.3