=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_macro.c,v retrieving revision 1.171 retrieving revision 1.172 diff -u -r1.171 -r1.172 --- src/usr.bin/mandoc/mdoc_macro.c 2017/02/11 14:08:35 1.171 +++ src/usr.bin/mandoc/mdoc_macro.c 2017/02/11 15:44:11 1.172 @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_macro.c,v 1.171 2017/02/11 14:08:35 schwarze Exp $ */ +/* $OpenBSD: mdoc_macro.c,v 1.172 2017/02/11 15:44:11 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012-2016 Ingo Schwarze @@ -398,6 +398,9 @@ struct roff_node *n; int irc; + if (target->flags & NODE_VALID) + return 0; + irc = 0; for (n = mdoc->last; n != NULL && n != target; n = n->parent) { if (n->flags & NODE_ENDED) @@ -731,9 +734,7 @@ do target = target->parent; while ( ! (target->flags & NODE_ENDED)); - if ( ! (target->flags & NODE_VALID)) - pending = find_pending(mdoc, ntok, - line, ppos, target); + pending = find_pending(mdoc, ntok, line, ppos, target); } if ( ! pending) rew_pending(mdoc, n);