From 58f1cabc333c6f387ba4325ca8aad059f45baa5e Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 8 Jan 2016 00:50:45 +0000 Subject: 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. --- eqn.c | 4 ++-- 1 file 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 * Copyright (c) 2014, 2015 Ingo Schwarze @@ -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; -- cgit v1.2.3-56-ge451