From 36097423ac8b35b42f700e0b63e3b6ac44d88235 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 30 Jan 2015 22:04:44 +0000 Subject: Have pity on the poor stack. Replace tail recursion by iteration when walking the syntax trees. No functional change. --- mdoc_term.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index c96a9ead..2b6a8c73 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -291,9 +291,10 @@ static void print_mdoc_nodelist(DECL_ARGS) { - print_mdoc_node(p, pair, meta, n); - if (n->next) - print_mdoc_nodelist(p, pair, meta, n->next); + while (n != NULL) { + print_mdoc_node(p, pair, meta, n); + n = n->next; + } } static void -- cgit