summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-05-29 16:11:40 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-05-29 16:11:40 +0000
commit9ba2ba024a33d9693fb061fcfb634ea35492ca49 (patch)
tree11756398761ac707d83085e3f1466dfb2868cd7e /mdoc_term.c
parenta179c7ed6c4435e934471a7f39ff5517b6d176b8 (diff)
downloadmandoc-9ba2ba024a33d9693fb061fcfb634ea35492ca49.tar.gz
Simplify condition, avoid duplicate code; no functional change.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index dadbf513..7cfb567a 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -313,14 +313,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;
- }
}
}