From 4b87be282b3a0f2d920933c1b948c3cd69863df4 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 29 May 2013 16:11:40 +0000 Subject: Simplify condition, avoid duplicate code; no functional change. --- mdoc_term.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index 1aa613db..8b059067 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.247 2013/05/29 15:40:22 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.248 2013/05/29 16:11:40 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012 Ingo Schwarze @@ -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; - } } } -- cgit v1.2.3