]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: drop unnecessary conditionals
authorSage Weil <sage@inktank.com>
Thu, 23 May 2013 17:23:43 +0000 (10:23 -0700)
committerSage Weil <sage@inktank.com>
Thu, 23 May 2013 17:23:43 +0000 (10:23 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/Paxos.cc

index bfb9ed4f5dd3a560a288bff35e5ac537de415fdd..3311d7bae93c02a61f62625890637298e03472f3 100644 (file)
@@ -1081,8 +1081,8 @@ void Paxos::leader_init()
 {
   cancel_events();
   new_value.clear();
-  if (!proposals.empty())
-    finish_contexts(g_ceph_context, proposals, -EAGAIN);
+
+  finish_contexts(g_ceph_context, proposals, -EAGAIN);
 
   if (mon->get_quorum().size() == 1) {
     state = STATE_ACTIVE;
@@ -1118,9 +1118,7 @@ void Paxos::restart()
 
   state = STATE_RECOVERING;
 
-  if (!proposals.empty())
-    finish_contexts(g_ceph_context, proposals, -EAGAIN);
-
+  finish_contexts(g_ceph_context, proposals, -EAGAIN);
   finish_contexts(g_ceph_context, waiting_for_commit, -EAGAIN);
   finish_contexts(g_ceph_context, waiting_for_active, -EAGAIN);
 }