about summary refs log tree commit diff homepage
path: root/lib/Core
diff options
context:
space:
mode:
authorᴀᴇꜱᴏᴘʜᴏʀ <m.aesophor@gmail.com>2021-10-30 21:56:42 +0800
committerCristian Cadar <c.cadar@imperial.ac.uk>2021-11-02 11:06:57 +0000
commita601685e34c61658f85d836a94f785192a5b426b (patch)
tree72e57e7eaaa00f28a309e15faec122009e8148e4 /lib/Core
parent95e1255fa864c4739da1d0bbd450d704de61a173 (diff)
downloadklee-a601685e34c61658f85d836a94f785192a5b426b.tar.gz
Core/Executor: use `nullptr` instead of `0`
Since KLEE requires C++14, we should prefer `nullptr` to plain `0`.
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/Executor.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 74ca7fb7..dcb078df 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -1048,7 +1048,7 @@ Executor::fork(ExecutionState &current, ref<Expr> condition, bool isInternal) {
   if (!success) {
     current.pc = current.prevPC;
     terminateStateEarly(current, "Query timed out (fork).");
-    return StatePair(0, 0);
+    return StatePair(nullptr, nullptr);
   }
 
   if (!isSeeding) {
@@ -1133,7 +1133,7 @@ Executor::fork(ExecutionState &current, ref<Expr> condition, bool isInternal) {
       }
     }
 
-    return StatePair(&current, 0);
+    return StatePair(&current, nullptr);
   } else if (res==Solver::False) {
     if (!isInternal) {
       if (pathWriter) {
@@ -1141,7 +1141,7 @@ Executor::fork(ExecutionState &current, ref<Expr> condition, bool isInternal) {
       }
     }
 
-    return StatePair(0, &current);
+    return StatePair(nullptr, &current);
   } else {
     TimerStatIncrementer timer(stats::forkTime);
     ExecutionState *falseState, *trueState = &current;
@@ -1212,7 +1212,7 @@ Executor::fork(ExecutionState &current, ref<Expr> condition, bool isInternal) {
     if (MaxDepth && MaxDepth<=trueState->depth) {
       terminateStateEarly(*trueState, "max-depth exceeded.");
       terminateStateEarly(*falseState, "max-depth exceeded.");
-      return StatePair(0, 0);
+      return StatePair(nullptr, nullptr);
     }
 
     return StatePair(trueState, falseState);
@@ -2110,7 +2110,7 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
   case Instruction::Ret: {
     ReturnInst *ri = cast<ReturnInst>(i);
     KInstIterator kcaller = state.stack.back().caller;
-    Instruction *caller = kcaller ? kcaller->inst : 0;
+    Instruction *caller = kcaller ? kcaller->inst : nullptr;
     bool isVoidReturn = (ri->getNumOperands() == 0);
     ref<Expr> result = ConstantExpr::alloc(0, Expr::Bool);