diff --git a/tree234.c b/tree234.c index 136f6e2..1cdae9f 100644 --- a/tree234.c +++ b/tree234.c @@ -332,7 +332,7 @@ static void *add234_internal(tree234 *t, void *e, int index) { } n = t->root; - while (n) { + do { LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n", n, n->kids[0], n->counts[0], n->elems[0], @@ -385,7 +385,7 @@ static void *add234_internal(tree234 *t, void *e, int index) { if (!n->kids[ki]) break; n = n->kids[ki]; - } + } while (n); add234_insert(NULL, e, NULL, &t->root, n, ki);