Minor cleanup to registrar.cpp.

Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/388fc834
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/388fc834
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/388fc834

Branch: refs/heads/master
Commit: 388fc834cce7072a813ff7273916dfbf0a113006
Parents: 3689a15
Author: Benjamin Mahler <[email protected]>
Authored: Mon Aug 10 17:51:35 2015 -0700
Committer: Benjamin Mahler <[email protected]>
Committed: Mon Aug 10 17:51:35 2015 -0700

----------------------------------------------------------------------
 src/master/registrar.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/388fc834/src/master/registrar.cpp
----------------------------------------------------------------------
diff --git a/src/master/registrar.cpp b/src/master/registrar.cpp
index b871229..ca8efb4 100644
--- a/src/master/registrar.cpp
+++ b/src/master/registrar.cpp
@@ -228,13 +228,11 @@ Future<T> timeout(
 
 
 // Helper for failing a deque of operations.
-void fail(deque<Owned<Operation> >* operations, const string& message)
+void fail(deque<Owned<Operation>>* operations, const string& message)
 {
   while (!operations->empty()) {
-    Owned<Operation> operation = operations->front();
+    operations->front()->fail(message);
     operations->pop_front();
-
-    operation->fail(message);
   }
 }
 

Reply via email to