From 0c4f51a1ba809fd153301c04bca347e79cab14cd Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 26 Dec 2013 19:02:04 +0000 Subject: Stop parsing man(7) input when we found all we were searching for, such that we don't trigger an assertion on a duplicate NAME section. --- mandocdb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index fe3ca594..ec748c2d 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1366,8 +1366,11 @@ parse_man(struct of *of, const struct man_node *n) } } - for (n = n->child; n; n = n->next) + for (n = n->child; n; n = n->next) { + if (NULL != of->desc) + break; parse_man(of, n); + } } static void -- cgit