diff options
Diffstat (limited to 'host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp b/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp index 56557bc39..dcb5d3473 100644 --- a/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp +++ b/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp @@ -82,13 +82,12 @@ std::vector<std::string> get_addrs_from_mb_args(const uhd::device_addr_t& mb_arg const mpmd_link_if_ctrl_udp::udp_link_info_map& link_info_list) { std::vector<std::string> addrs; - if(link_info_list.size() > 0 && - link_info_list.begin()->second.link_type == "internal") { + if (!link_info_list.empty() + && link_info_list.begin()->second.link_type == "internal") { // If link_type is "internal" we are local. In this case // use this address always. MPM knows better than us. addrs.push_back(link_info_list.begin()->first); - } - else { + } else { if (mb_args.has_key(FIRST_ADDR_KEY)) { addrs.push_back(mb_args[FIRST_ADDR_KEY]); } @@ -97,10 +96,9 @@ std::vector<std::string> get_addrs_from_mb_args(const uhd::device_addr_t& mb_arg } } if(addrs.empty()) { - if(link_info_list.size() > 0) { + if (!link_info_list.empty()) { addrs.push_back(link_info_list.begin()->first); - } - else { + } else { UHD_LOG_WARNING("MPMD::XPORT::UDP", "The `" << FIRST_ADDR_KEY << "' key must be specified in " |