aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit58f1cabc333c6f387ba4325ca8aad059f45baa5e (patch)
tree2006251b0f32300221641226bcd75bbc114f262c /eqn.c
parent3888e737c349e3072adb67fd3bab4ef6509cf572 (diff)
downloadmandoc-58f1cabc333c6f387ba4325ca8aad059f45baa5e.tar.gz
mandoc-58f1cabc333c6f387ba4325ca8aad059f45baa5e.tar.zst
mandoc-58f1cabc333c6f387ba4325ca8aad059f45baa5e.zip
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eqn.c b/eqn.c
index bac9a0c7..e9fbdec0 100644
--- a/eqn.c
+++ b/eqn.c
@@ -1,4 +1,4 @@
-/* $Id: eqn.c,v 1.60 2016/01/07 20:19:01 schwarze Exp $ */
+/* $Id: eqn.c,v 1.61 2016/01/08 00:50:45 schwarze Exp $ */
/*
* Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;