]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/mon: reset promise using `{}`
authorKefu Chai <kchai@redhat.com>
Thu, 11 Apr 2019 13:44:57 +0000 (21:44 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 16 Apr 2019 23:13:46 +0000 (07:13 +0800)
better readability, less repeating.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/mon/MonClient.cc

index fc6eb1f0ef211549060ec42b85543bed65d8860d..a5fcfcd09f6b4d9fcf363ad74da68d1419afc866 100644 (file)
@@ -205,7 +205,7 @@ seastar::future<bool> Connection::do_auth()
     logger().info("mon {} => {} returns {}: {}",
                    conn->get_messenger()->get_myaddr(),
                    conn->get_peer_addr(), *m, m->result);
-    reply = decltype(reply){};
+    reply = {};
     auto p = m->result_bl.cbegin();
     auto ret = auth->handle_response(m->result, p,
 #warning fix crimson: session_key, connection_secret
@@ -228,7 +228,7 @@ Connection::authenticate_v1(epoch_t epoch,
   }).then([this] {
     return reply.get_future();
   }).then([name, want_keys, this](Ref<MAuthReply> m) {
-    reply = decltype(reply){};
+    reply = {};
     if (m->global_id != global_id) {
       // it's a new session
       global_id = m->global_id;