diff options
author | Ed Tanous <ed@tanous.net> | 2020-12-17 19:54:55 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2020-12-18 23:21:35 +0300 |
commit | 81ce609e30274435b4f8c3fc65340c6b6b153b0c (patch) | |
tree | f07c0bb8f950f81adc853845e009d9d40e254468 /redfish-core/lib/network_protocol.hpp | |
parent | f16f62633a64f386fd0382703ff0949ea177f457 (diff) | |
download | bmcweb-81ce609e30274435b4f8c3fc65340c6b6b153b0c.tar.xz |
Fix .clang-tidy
camelLower is not a type, camelBack is.
Changes were made automatically with clang-tidy --fix-errors
To be able to apply changes automatically, the only way I've found that
works was to build the version of clang/clang-tidy that yocto has, and
run the fix script within bitbake -c devshell bmcweb. Unfortunately,
yocto has clang-tidy 11, which can apparently find a couple extra errors
in tests we already had enabled. As such, a couple of those are also
included.
Tested:
Ran clang-tidy-11 and got a clean result.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9d1080b67f0342229c2f267160849445c065ca51
Diffstat (limited to 'redfish-core/lib/network_protocol.hpp')
-rw-r--r-- | redfish-core/lib/network_protocol.hpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp index 31efc7552e..b82e697b78 100644 --- a/redfish-core/lib/network_protocol.hpp +++ b/redfish-core/lib/network_protocol.hpp @@ -60,11 +60,11 @@ const static boost::container::flat_map<const char*, std::string> {"IPMI", "phosphor-ipmi-net"}}; inline void - extractNTPServersAndDomainNamesData(const GetManagedObjects& dbus_data, + extractNTPServersAndDomainNamesData(const GetManagedObjects& dbusData, std::vector<std::string>& ntpData, std::vector<std::string>& dnData) { - for (const auto& obj : dbus_data) + for (const auto& obj : dbusData) { for (const auto& ifacePair : obj.second) { @@ -107,18 +107,18 @@ void getEthernetIfaceData(CallbackFunc&& callback) { crow::connections::systemBus->async_method_call( [callback{std::move(callback)}]( - const boost::system::error_code error_code, - const GetManagedObjects& dbus_data) { + const boost::system::error_code errorCode, + const GetManagedObjects& dbusData) { std::vector<std::string> ntpServers; std::vector<std::string> domainNames; - if (error_code) + if (errorCode) { callback(false, ntpServers, domainNames); return; } - extractNTPServersAndDomainNamesData(dbus_data, ntpServers, + extractNTPServersAndDomainNamesData(dbusData, ntpServers, domainNames); callback(true, ntpServers, domainNames); @@ -166,9 +166,9 @@ class NetworkProtocol : public Node void getNTPProtocolEnabled(const std::shared_ptr<AsyncResp>& asyncResp) { crow::connections::systemBus->async_method_call( - [asyncResp](const boost::system::error_code error_code, + [asyncResp](const boost::system::error_code errorCode, const std::variant<std::string>& timeSyncMethod) { - if (error_code) + if (errorCode) { return; } @@ -390,8 +390,8 @@ class NetworkProtocol : public Node } crow::connections::systemBus->async_method_call( - [asyncResp](const boost::system::error_code error_code) { - if (error_code) + [asyncResp](const boost::system::error_code errorCode) { + if (errorCode) { messages::internalError(asyncResp->res); } |