From 37e4f613d515d495c8df9b41c00846bc5b4b6cc1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 4 Feb 2019 04:57:51 -0600 Subject: [PATCH] msg/msg_types: drop any: prefix If it can be any type of address, then simply don't specify the type. This is less confusing for humans. Signed-off-by: Sage Weil --- src/msg/msg_types.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/msg/msg_types.cc b/src/msg/msg_types.cc index 705b59575f7..62ca036e225 100644 --- a/src/msg/msg_types.cc +++ b/src/msg/msg_types.cc @@ -180,8 +180,10 @@ ostream& operator<<(ostream& out, const entity_addr_t &addr) if (addr.type == entity_addr_t::TYPE_NONE) { return out << "-"; } - out << entity_addr_t::get_type_name(addr.type) << ":" - << addr.get_sockaddr() << '/' << addr.nonce; + if (addr.type != entity_addr_t::TYPE_ANY) { + out << entity_addr_t::get_type_name(addr.type) << ":"; + } + out << addr.get_sockaddr() << '/' << addr.nonce; return out; } -- 2.39.5