summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2013-05-29 16:11:33 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2013-05-29 16:11:33 +0000
commit650056d9d1a80f3f6485daa4aeba1bd622e492ab (patch)
treeb60bb44da3c346f1cb5afabcef123ed70bae5dcb /usr.bin/mandoc
parentbbac36c55258a9b42c1913bebe646cc29572a08d (diff)
Simplify condition, avoid duplicate code; no functional change.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/mdoc_term.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index 4df769b7bf5..f2dd504e067 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.149 2013/05/29 15:40:14 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.150 2013/05/29 16:11:32 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012 Ingo Schwarze <schwarze@openbsd.org>
@@ -309,14 +309,10 @@ print_mdoc_node(DECL_ARGS)
*/
if (TERMP_KEEP & p->flags || MDOC_SYNPRETTY & n->flags) {
- if (n->prev && n->prev->line != n->line) {
+ if (n->prev ? (n->prev->line != n->line) :
+ (n->parent && n->parent->line != n->line)) {
p->flags &= ~TERMP_KEEP;
p->flags |= TERMP_PREKEEP;
- } else if (NULL == n->prev) {
- if (n->parent && n->parent->line != n->line) {
- p->flags &= ~TERMP_KEEP;
- p->flags |= TERMP_PREKEEP;
- }
}
}