]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/msg_types: drop any: prefix
authorSage Weil <sage@redhat.com>
Mon, 4 Feb 2019 10:57:51 +0000 (04:57 -0600)
committerSage Weil <sage@redhat.com>
Thu, 7 Feb 2019 12:13:09 +0000 (06:13 -0600)
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 <sage@redhat.com>
src/msg/msg_types.cc

index 705b59575f7f3d1971bf7fc2f97fccf1c2f1eb3c..62ca036e225907a4baf3894b883767be96a361b3 100644 (file)
@@ -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;
 }