cleanup: Fix warnings found by cppcheck
Fix various warnings found by cppcheck.
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I4db2319f5890d7aa73c8f418f610a6cba338ce24
diff --git a/usb/usb_manager.cpp b/usb/usb_manager.cpp
index 5e225ac..4a1f768 100644
--- a/usb/usb_manager.cpp
+++ b/usb/usb_manager.cpp
@@ -57,11 +57,11 @@
{
utils::PropertyValue value =
"xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.OnReset";
- constexpr auto objectPath = "/xyz/openbmc_project/software/apply_time";
- constexpr auto interface = "xyz.openbmc_project.Software.ApplyTime";
- constexpr auto propertyName = "RequestedApplyTime";
try
{
+ constexpr auto objectPath = "/xyz/openbmc_project/software/apply_time";
+ constexpr auto interface = "xyz.openbmc_project.Software.ApplyTime";
+ constexpr auto propertyName = "RequestedApplyTime";
utils::setProperty(bus, objectPath, interface, propertyName, value);
}
catch (const std::exception& e)
@@ -75,10 +75,10 @@
{
utils::PropertyValue value =
"xyz.openbmc_project.Software.Activation.RequestedActivations.Active";
- constexpr auto interface = "xyz.openbmc_project.Software.Activation";
- constexpr auto propertyName = "RequestedActivation";
try
{
+ constexpr auto interface = "xyz.openbmc_project.Software.Activation";
+ constexpr auto propertyName = "RequestedActivation";
utils::setProperty(bus, path, interface, propertyName, value);
}
catch (const std::exception& e)