model: remove local variable
[model-checker.git] / model.cc
index 0964ae7ed2be03721cca662598200382151b2230..a074f6c10c3e6ca8a47d80bcd5e08a81625f9256 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -738,8 +738,7 @@ bool ModelChecker::process_read(ModelAction *curr, bool second_part_of_rmw)
                        struct future_value fv = curr->get_node()->get_future_value();
                        value = fv.value;
                        curr->set_read_from(NULL);
-                       Promise *valuepromise = new Promise(curr, fv);
-                       promises->push_back(valuepromise);
+                       promises->push_back(new Promise(curr, fv));
                }
                get_thread(curr)->set_return_value(value);
                return updated;
@@ -2459,7 +2458,7 @@ void ModelChecker::mo_check_promises(thread_id_t tid, const ModelAction *write,
                }
 
                //Don't do any lookups twice for the same thread
-               if (promise->has_sync_thread(tid))
+               if (promise->thread_is_eliminated(tid))
                        continue;
 
                if (promise->get_write() && mo_graph->checkReachable(promise->get_write(), write)) {