model: remove local variable
authorBrian Norris <banorris@uci.edu>
Thu, 24 Jan 2013 00:34:00 +0000 (16:34 -0800)
committerBrian Norris <banorris@uci.edu>
Thu, 24 Jan 2013 00:34:00 +0000 (16:34 -0800)
model.cc

index ac88933357cc3d6be512b0b61509846cbd50e4aa..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;