From: xie xingguo Date: Fri, 15 Mar 2019 08:07:14 +0000 (+0800) Subject: mon/MonMap: kill dead msgr type checking X-Git-Tag: v15.0.0~222^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ff3bdea3da6761a52b75da18bbac5ca6694b141;p=ceph.git mon/MonMap: kill dead msgr type checking which is unreachable. Signed-off-by: xie xingguo --- diff --git a/src/mon/MonMap.cc b/src/mon/MonMap.cc index 20d956141bd0..ab99b50ac675 100644 --- a/src/mon/MonMap.cc +++ b/src/mon/MonMap.cc @@ -363,9 +363,7 @@ void MonMap::_add_ambiguous_addr(const string& name, // a v1: or v2: prefix was specified if (addr.get_port() == 0) { // use default port - if (addr.get_type() == entity_addr_t::TYPE_ANY) { - addr.set_port(CEPH_MON_PORT_IANA); - } else if (addr.get_type() == entity_addr_t::TYPE_LEGACY) { + if (addr.get_type() == entity_addr_t::TYPE_LEGACY) { addr.set_port(CEPH_MON_PORT_LEGACY); } else if (addr.get_type() == entity_addr_t::TYPE_MSGR2) { addr.set_port(CEPH_MON_PORT_IANA);