summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-03-04 21:41:29 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-03-04 21:41:29 +0000
commit0f78a29922207cc3b202fba2d268804382c6cb18 (patch)
tree10f1e2c7fedd71ea9cc588916d1cb593c2d52282
parentf13f5fb6cfbf03df6d30eb3322d11bbb9e955fb2 (diff)
downloadmandoc-0f78a29922207cc3b202fba2d268804382c6cb18.tar.gz
Remove a redundant condition in .%T handling, no functional change.
Found by jsg@ with scan-build.
-rw-r--r--mdoc_man.c6
-rw-r--r--mdoc_markdown.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index 9c7a37d3..809206ec 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -715,8 +715,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
@@ -728,8 +727,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/mdoc_markdown.c b/mdoc_markdown.c
index 6fcaceb3..ae06201e 100644
--- a/mdoc_markdown.c
+++ b/mdoc_markdown.c
@@ -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("*");