From 4c5fff6d495754eaa3589e6d66ea5b151c50eec8 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 18 Oct 2016 13:37:59 +0000 Subject: [PATCH] makewhatis: avoid skipping another page after one with no mlinks Submitted by: Ingo Schwarze MFC after: 3 weeks MFC with: r307003 --- contrib/mdocml/mandocdb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/mdocml/mandocdb.c b/contrib/mdocml/mandocdb.c index d727ce0e9a3..3b9bda0d612 100644 --- a/contrib/mdocml/mandocdb.c +++ b/contrib/mdocml/mandocdb.c @@ -1146,10 +1146,8 @@ mpages_merge(struct mparse *mp) for (mpage = mpage_head; mpage != NULL; mpage = mpage->next) { mlinks_undupe(mpage); - if ((mlink = mpage->mlinks) == NULL) { - mpage = mpage->next; + if ((mlink = mpage->mlinks) == NULL) continue; - } name_mask = NAME_MASK; mandoc_ohash_init(&names, 4, offsetof(struct str, key));