about summary refs log tree commit diff homepage
path: root/lib/Expr
diff options
context:
space:
mode:
authorOscar Deits <odeits@vidder.com>2017-08-27 23:19:29 -0400
committerOscar Deits <odeits@vidder.com>2017-08-27 23:19:29 -0400
commitb5929722363993bf0ad2a56d66176606cc742bc4 (patch)
treeb6dce38dd98d681e97d08d0b42adff078ccf7215 /lib/Expr
parentd19500eb93083c8cc6bb72bcb54414015830cacb (diff)
downloadklee-b5929722363993bf0ad2a56d66176606cc742bc4.tar.gz
Remove unnecessary null pointer checks
Fixes klee/klee#717

delete on null pointer is always safe.
Diffstat (limited to 'lib/Expr')
-rw-r--r--lib/Expr/ExprSMTLIBPrinter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Expr/ExprSMTLIBPrinter.cpp b/lib/Expr/ExprSMTLIBPrinter.cpp
index 192e3461..fd515509 100644
--- a/lib/Expr/ExprSMTLIBPrinter.cpp
+++ b/lib/Expr/ExprSMTLIBPrinter.cpp
@@ -61,14 +61,12 @@ ExprSMTLIBPrinter::ExprSMTLIBPrinter()
 }
 
 ExprSMTLIBPrinter::~ExprSMTLIBPrinter() {
-  if (p != NULL)
-    delete p;
+  delete p;
 }
 
 void ExprSMTLIBPrinter::setOutput(llvm::raw_ostream &output) {
   o = &output;
-  if (p != NULL)
-    delete p;
+  delete p;
 
   p = new PrintContext(output);
 }