diff options
author | 2015-01-30 22:04:15 +0000 | |
---|---|---|
committer | 2015-01-30 22:04:15 +0000 | |
commit | e453490503e4648686b99f1a86a3778917adbe65 (patch) | |
tree | 9087b4af0031d8b7190a2bb018e9289e35ffcd7e /usr.bin/mandoc/man_html.c | |
parent | starting a tbl(7) breaks man(7) next-line scope; (diff) | |
download | wireguard-openbsd-e453490503e4648686b99f1a86a3778917adbe65.tar.xz wireguard-openbsd-e453490503e4648686b99f1a86a3778917adbe65.zip |
Have pity on the poor stack.
Replace tail recursion by iteration when walking the syntax trees.
No functional change.
Diffstat (limited to 'usr.bin/mandoc/man_html.c')
-rw-r--r-- | usr.bin/mandoc/man_html.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c index df647c50da1..40f1dcbcdf3 100644 --- a/usr.bin/mandoc/man_html.c +++ b/usr.bin/mandoc/man_html.c @@ -1,7 +1,7 @@ -/* $OpenBSD: man_html.c,v 1.62 2015/01/24 02:41:32 schwarze Exp $ */ +/* $OpenBSD: man_html.c,v 1.63 2015/01/30 22:04:15 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> - * Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -190,9 +190,10 @@ static void print_man_nodelist(MAN_ARGS) { - print_man_node(man, n, mh, h); - if (n->next) - print_man_nodelist(man, n->next, mh, h); + while (n != NULL) { + print_man_node(man, n, mh, h); + n = n->next; + } } static void |