diff options
author | 2013-12-26 19:02:04 +0000 | |
---|---|---|
committer | 2013-12-26 19:02:04 +0000 | |
commit | 53beca6323818e3247d4b1602f92addf87fb3f69 (patch) | |
tree | abc34e2344c9efc168e3f63aa86596e0f989892f /mandocdb.c | |
parent | f6563ba0304acecf4e8cb3d3ca84faf6ebeac5d1 (diff) | |
download | mandoc-53beca6323818e3247d4b1602f92addf87fb3f69.tar.gz mandoc-53beca6323818e3247d4b1602f92addf87fb3f69.tar.zst mandoc-53beca6323818e3247d4b1602f92addf87fb3f69.zip |
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.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.76 2013/10/27 17:01:18 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.77 2013/12/26 19:02:04 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -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 |