]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/Messenger: remove unused variable r 39897/head
authorhaoyixing <35906248@qq.com>
Sun, 7 Mar 2021 08:11:03 +0000 (08:11 +0000)
committerhaoyixing <haoyixing@kuaishou.com>
Sun, 7 Mar 2021 08:15:33 +0000 (08:15 +0000)
We only have async msgr now, so remove check about simple.

Signed-off-by: haoyixing <haoyixing@kuaishou.com>
src/msg/Messenger.cc

index eab2f2909c80012e3ed2d3fefee3fa97d4ca32a9..fb85f42bc91cb16a0d51522e678c28d384d985df 100644 (file)
@@ -37,12 +37,7 @@ Messenger *Messenger::create(CephContext *cct, const std::string &type,
                             entity_name_t name, std::string lname,
                             uint64_t nonce)
 {
-  int r = -1;
-  if (type == "random") {
-    r = 0;
-    //r = ceph::util::generate_random_number(0, 1);
-  }
-  if (r == 0 || type.find("async") != std::string::npos)
+  if (type == "random" || type.find("async") != std::string::npos)
     return new AsyncMessenger(cct, name, type, std::move(lname), nonce);
   lderr(cct) << "unrecognized ms_type '" << type << "'" << dendl;
   return nullptr;