diff options
author | 2015-02-05 00:13:34 +0000 | |
---|---|---|
committer | 2015-02-05 00:13:34 +0000 | |
commit | a61aeda0fa63a9864159c4270f4cef537321df38 (patch) | |
tree | e660ed447ea4675fa379b32d5499400af45553d8 /usr.bin/mandoc/mdoc_html.c | |
parent | potential double free in while-loop (diff) | |
download | wireguard-openbsd-a61aeda0fa63a9864159c4270f4cef537321df38.tar.xz wireguard-openbsd-a61aeda0fa63a9864159c4270f4cef537321df38.zip |
Simplify by deleting the "lastline" member of struct mdoc_node.
Minus one struct member, minus 17 lines of code, no functional change.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index 5cf4487c581..2835470e487 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_html.c,v 1.96 2015/02/01 23:10:15 schwarze Exp $ */ +/* $OpenBSD: mdoc_html.c,v 1.97 2015/02/05 00:13:34 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -434,12 +434,9 @@ print_mdoc_node(MDOC_ARGS) break; } - if (HTML_KEEP & h->flags) { - if (n->prev ? (n->prev->lastline != n->line) : - (n->parent && n->parent->line != n->line)) { - h->flags &= ~HTML_KEEP; - h->flags |= HTML_PREKEEP; - } + if (h->flags & HTML_KEEP && n->flags & MDOC_LINE) { + h->flags &= ~HTML_KEEP; + h->flags |= HTML_PREKEEP; } if (child && n->child) |