summaryrefslogtreecommitdiff
path: root/include/hostname_monitor.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-07 22:38:34 +0300
committerEd Tanous <ed@tanous.net>2022-01-10 20:36:54 +0300
commit914e2d5d5dbeddca9f48504256f7089efe86fc65 (patch)
treeb9e60be35e5a15989b5d2d70038e9085dbd6e2bb /include/hostname_monitor.hpp
parent711ac7a931dd3f151fc4064063b5ea90404b9054 (diff)
downloadbmcweb-914e2d5d5dbeddca9f48504256f7089efe86fc65.tar.xz
Enforce const correctness
For all async calls, we should be consistently capturing non trivial objects by const reference. This corrects bmcweb to be consistent and capture errors by const value, and objects by const reference. Tested: Code compiles. Trivial changes. This saves about 300 bytes on our compressed binary size. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib3e0b6edef9803a1c480701556949488406305d4
Diffstat (limited to 'include/hostname_monitor.hpp')
-rw-r--r--include/hostname_monitor.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp
index 17fbe510c4..65a5c1c34a 100644
--- a/include/hostname_monitor.hpp
+++ b/include/hostname_monitor.hpp
@@ -16,7 +16,7 @@ static std::unique_ptr<sdbusplus::bus::match::match> hostnameSignalMonitor;
inline void installCertificate(const std::filesystem::path& certPath)
{
crow::connections::systemBus->async_method_call(
- [certPath](boost::system::error_code ec) {
+ [certPath](const boost::system::error_code ec) {
if (ec)
{
BMCWEB_LOG_ERROR << "Replace Certificate Fail..";