]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/msg_types: pass TYPE_DEFAULT as default_type to entity_addr_t::parse()
authorKefu Chai <kchai@redhat.com>
Mon, 5 Apr 2021 02:50:38 +0000 (10:50 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 5 Apr 2021 04:33:01 +0000 (12:33 +0800)
commit0b37c3b67a2ee3f21937ce26588dfb9e0c45fa25
treeb68ed10bb4fee853e53595303b7a87b5f50c85fe
parentb9e72ffe3a4f33c365fa33953fb3716023080871
msg/msg_types: pass TYPE_DEFAULT as default_type to entity_addr_t::parse()

TYPE_NONE equals to 0, and we use it for the default value of entity's
messenger protocol version, if it is not specified. but we always use
TYPE_DEFAULT for the protocol version if it's not specified in the
parsed string or the parameter.

so we can just simplify the logic by assigning it to `newtype`, and
assign the parse value to `new_type` for better readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/msg/msg_types.cc
src/msg/msg_types.h