diff options
author | Ed Tanous <edtanous@google.com> | 2023-06-07 19:24:59 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-06-09 19:02:42 +0300 |
commit | ac106bf6d10841a25088ed14105a73636ba71519 (patch) | |
tree | f8a3994884fc9ad2ce1df6f8ab50590b707c3ff7 /redfish-core/lib/manager_diagnostic_data.hpp | |
parent | 69c3cf09a67041de8084b5f7fa7b0f54725a27fa (diff) | |
download | bmcweb-ac106bf6d10841a25088ed14105a73636ba71519.tar.xz |
Consistently name AsyncResp variables
In about half of our code, AsyncResp objects take the name asyncResp,
and in the other half they take the name aResp. While the difference
between them is negligeble and arbitrary, having two naming conventions
makes it more difficult to do automated changes over time via grep.
This commit was generated automtatically with the command:
git grep -l 'aResp' | xargs sed -i 's|aResp|asyncResp|g'
Tested: Code compiles.
Change-Id: Id363437b6a78f51e91cbf60aa0a0c2286f36a037
Signed-off-by: Ed Tanous <edtanous@google.com>
Diffstat (limited to 'redfish-core/lib/manager_diagnostic_data.hpp')
-rw-r--r-- | redfish-core/lib/manager_diagnostic_data.hpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/redfish-core/lib/manager_diagnostic_data.hpp b/redfish-core/lib/manager_diagnostic_data.hpp index 14b75feaf1..ec742310c3 100644 --- a/redfish-core/lib/manager_diagnostic_data.hpp +++ b/redfish-core/lib/manager_diagnostic_data.hpp @@ -16,10 +16,9 @@ namespace redfish { -inline void - afterGetManagerStartTime(const std::shared_ptr<bmcweb::AsyncResp>& aResp, - const boost::system::error_code& ec, - uint64_t bmcwebResetTime) +inline void afterGetManagerStartTime( + const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, + const boost::system::error_code& ec, uint64_t bmcwebResetTime) { if (ec) { @@ -39,7 +38,7 @@ inline void if (runTime < steady_clock::duration::zero()) { BMCWEB_LOG_CRITICAL << "Uptime was negative????"; - messages::internalError(aResp->res); + messages::internalError(asyncResp->res); return; } @@ -50,17 +49,17 @@ inline void using SecondsFloat = std::chrono::duration<double>; SecondsFloat sec = std::chrono::duration_cast<SecondsFloat>(milli); - aResp->res.jsonValue["ServiceRootUptimeSeconds"] = sec.count(); + asyncResp->res.jsonValue["ServiceRootUptimeSeconds"] = sec.count(); } -inline void - managerGetServiceRootUptime(const std::shared_ptr<bmcweb::AsyncResp>& aResp) +inline void managerGetServiceRootUptime( + const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { sdbusplus::asio::getProperty<uint64_t>( *crow::connections::systemBus, "org.freedesktop.systemd1", "/org/freedesktop/systemd1/unit/bmcweb_2eservice", "org.freedesktop.systemd1.Unit", "ActiveEnterTimestampMonotonic", - std::bind_front(afterGetManagerStartTime, aResp)); + std::bind_front(afterGetManagerStartTime, asyncResp)); } /** * handleManagerDiagnosticData supports ManagerDiagnosticData. |