ccan: make tal_dump() format more regular.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Nov 2021 02:06:52 +0000 (12:36 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Nov 2021 02:06:52 +0000 (12:36 +1030)
Putting a \n in there was a pain: I had to do:

awk '/CHILDREN/ { SAVED=$0 } !/CHILDREN/ { print SAVED$0; SAVED="" }' < lightningd-tal_dump > lightningd-tal_dump-children-on-same-line

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/tal/tal.c

index fec47ac5c0f5d2eebd457a9af1a56944378f0f60..05d52e1dbe5cab4409461c42b2c26ed57b009987 100644 (file)
@@ -837,7 +837,7 @@ static void dump_node(unsigned int indent, const struct tal_hdr *t)
                switch (p->type) {
                case CHILDREN:
                        c = (struct children *)p;
-                       fprintf(stderr, " CHILDREN(%p):parent=%p,children={%p,%p}\n",
+                       fprintf(stderr, " CHILDREN(%p):parent=%p,children={%p,%p}",
                               p, c->parent,
                               c->children.n.prev, c->children.n.next);
                        break;