summaryrefslogtreecommitdiffstats
path: root/eqn.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-01-08 00:50:45 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-01-08 00:50:45 +0000
commit3e0aae8984ce6aefc8a431271245c33087867463 (patch)
treeee9631677a587ee253cd666618fae6a1dfe3e26a /eqn.c
parenteb8a728a2ecb1ac5b786710c85f87504f32554f8 (diff)
downloadmandoc-3e0aae8984ce6aefc8a431271245c33087867463.tar.gz
The root of an .EQ tree is always EQN_ROOT, never EQN_LIST,
so delete a redundant NULL check that confused Coverity in CID 1257471; issue reported by wiz@, patch differs from what christos@ did in NetBSD. No functional change.
Diffstat (limited to 'eqn.c')
-rw-r--r--eqn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eqn.c b/eqn.c
index b84ce7e5..2d979dcd 100644
--- a/eqn.c
+++ b/eqn.c
@@ -987,7 +987,7 @@ this_tok:
parent->right = mandoc_strndup(start, sz);
}
parent = parent->parent;
- if (EQN_TOK_BRACE_CLOSE == tok && parent &&
+ if (tok == EQN_TOK_BRACE_CLOSE &&
(parent->type == EQN_PILE ||
parent->type == EQN_MATRIX))
parent = parent->parent;