From 53beca6323818e3247d4b1602f92addf87fb3f69 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mandocdb.c b/mandocdb.c index 36ce96cc..337a815a 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -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 * Copyright (c) 2011, 2012, 2013 Ingo Schwarze @@ -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 v1.2.3-56-ge451