diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-03-04 21:41:14 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-03-04 21:41:14 +0000 |
commit | 5bd1e9fa20d0de6dd01e4073c2326c0d51c27049 (patch) | |
tree | c58bee084e9a868950ee95894da5ecfa0066888c /usr.bin | |
parent | 734281ed4b6cfe374c49f6895e6960a8bbe10592 (diff) |
Remove a redundant condition in .%T handling, no functional change.
Found by jsg@ with scan-build.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/mdoc_man.c | 8 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_markdown.c | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c index ca1f8cadabf..36f09ae60fd 100644 --- a/usr.bin/mandoc/mdoc_man.c +++ b/usr.bin/mandoc/mdoc_man.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_man.c,v 1.102 2017/02/17 19:14:39 schwarze Exp $ */ +/* $OpenBSD: mdoc_man.c,v 1.103 2017/03/04 21:41:13 schwarze Exp $ */ /* * Copyright (c) 2011-2017 Ingo Schwarze <schwarze@openbsd.org> * @@ -713,8 +713,7 @@ static int pre__t(DECL_ARGS) { - if (n->parent && MDOC_Rs == n->parent->tok && - n->parent->norm->Rs.quote_T) { + if (n->parent->tok == MDOC_Rs && n->parent->norm->Rs.quote_T) { print_word("\\(lq"); outflags &= ~MMAN_spc; } else @@ -726,8 +725,7 @@ static void post__t(DECL_ARGS) { - if (n->parent && MDOC_Rs == n->parent->tok && - n->parent->norm->Rs.quote_T) { + if (n->parent->tok == MDOC_Rs && n->parent->norm->Rs.quote_T) { outflags &= ~MMAN_spc; print_word("\\(rq"); } else diff --git a/usr.bin/mandoc/mdoc_markdown.c b/usr.bin/mandoc/mdoc_markdown.c index ac8d2c9b3f1..a75931de634 100644 --- a/usr.bin/mandoc/mdoc_markdown.c +++ b/usr.bin/mandoc/mdoc_markdown.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_markdown.c,v 1.1 2017/03/03 14:21:41 schwarze Exp $ */ +/* $OpenBSD: mdoc_markdown.c,v 1.2 2017/03/04 21:41:13 schwarze Exp $ */ /* * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> * @@ -1419,8 +1419,7 @@ md_pre_Xr(struct roff_node *n) static int md_pre__T(struct roff_node *n) { - if (n->parent != NULL && n->parent->tok == MDOC_Rs && - n->parent->norm->Rs.quote_T) + if (n->parent->tok == MDOC_Rs && n->parent->norm->Rs.quote_T) md_word("\""); else md_rawword("*"); @@ -1432,8 +1431,7 @@ static void md_post__T(struct roff_node *n) { outflags &= ~MD_spc; - if (n->parent != NULL && n->parent->tok == MDOC_Rs && - n->parent->norm->Rs.quote_T) + if (n->parent->tok == MDOC_Rs && n->parent->norm->Rs.quote_T) md_word("\""); else md_rawword("*"); |