Skip to content

Commit

Permalink
Merge pull request ceph#23547 from yaozongyou/mon-get-rank
Browse files Browse the repository at this point in the history
mon/MonMap: remove duplicate code in get_rank

Reviewed-by: Kefu Chai <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
Reviewed-by: Joao Eduardo Luis <[email protected]>
  • Loading branch information
yuriw authored Aug 16, 2018
2 parents 0feccf0 + a4ff39a commit dbed62b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/mon/MonMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,7 @@ class MonMap {
if (n.empty())
return -1;

for (unsigned i = 0; i < ranks.size(); i++)
if (ranks[i] == n)
return i;
return -1;
return get_rank(n);
}
bool get_addr_name(const entity_addr_t& a, string& name) {
if (addr_mons.count(a) == 0)
Expand Down

0 comments on commit dbed62b

Please sign in to comment.