summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-26 19:02:04 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-26 19:02:04 +0000
commit0c4f51a1ba809fd153301c04bca347e79cab14cd (patch)
treec335376b76eebea8cb32255ec2a377ec9146cdec /mandocdb.c
parent35061f8c0fddd0fd2d0a0efbf19268b66a4d75d3 (diff)
downloadmandoc-0c4f51a1ba809fd153301c04bca347e79cab14cd.tar.gz
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.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c5
1 files changed, 4 insertions, 1 deletions
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