From b5929722363993bf0ad2a56d66176606cc742bc4 Mon Sep 17 00:00:00 2001 From: Oscar Deits Date: Sun, 27 Aug 2017 23:19:29 -0400 Subject: Remove unnecessary null pointer checks Fixes klee/klee#717 delete on null pointer is always safe. --- include/klee/Internal/ADT/DiscretePDF.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/klee/Internal/ADT/DiscretePDF.inc b/include/klee/Internal/ADT/DiscretePDF.inc index eb7bd860..32328c95 100644 --- a/include/klee/Internal/ADT/DiscretePDF.inc +++ b/include/klee/Internal/ADT/DiscretePDF.inc @@ -53,8 +53,8 @@ DiscretePDF::Node::Node(T key_, weight_type weight_, Node *parent_) { template DiscretePDF::Node::~Node() { - if (left) delete left; - if (right) delete right; + delete left; + delete right; } // @@ -66,7 +66,7 @@ DiscretePDF::DiscretePDF() { template DiscretePDF::~DiscretePDF() { - if (m_root) delete m_root; + delete m_root; } template -- cgit 1.4.1