aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-01-08 09:33:36 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-03-04 08:07:26 -0600
commit107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 (patch)
treefdeaad56030a02948377c45838dab97beb7a5c84 /host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp
parent7d5e48032baa62cbe7467833b9e057900602f4b9 (diff)
downloaduhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.gz
uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.bz2
uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.zip
host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
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.cpp12
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 "