diff --git a/redfish-core/lib/fan.hpp b/redfish-core/lib/fan.hpp
index 3a7e2e2..7e4f8fa 100644
--- a/redfish-core/lib/fan.hpp
+++ b/redfish-core/lib/fan.hpp
@@ -335,26 +335,26 @@
         });
 }
 
-inline void getFanLocation(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+inline void getFanLocation(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                            const std::string& fanPath,
                            const std::string& service)
 {
     sdbusplus::asio::getProperty<std::string>(
         *crow::connections::systemBus, service, fanPath,
         "xyz.openbmc_project.Inventory.Decorator.LocationCode", "LocationCode",
-        [aResp](const boost::system::error_code& ec,
-                const std::string& property) {
+        [asyncResp](const boost::system::error_code& ec,
+                    const std::string& property) {
         if (ec)
         {
             if (ec.value() != EBADR)
             {
                 BMCWEB_LOG_ERROR("DBUS response error for Location{}",
                                  ec.value());
-                messages::internalError(aResp->res);
+                messages::internalError(asyncResp->res);
             }
             return;
         }
-        aResp->res.jsonValue["Location"]["PartLocation"]["ServiceLabel"] =
+        asyncResp->res.jsonValue["Location"]["PartLocation"]["ServiceLabel"] =
             property;
         });
 }
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 609af71..54dbd70 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -1944,13 +1944,14 @@
 /**
  * @brief Sets stopBootOnFault
  *
- * @param[in] aResp   Shared pointer for generating response message.
+ * @param[in] asyncResp   Shared pointer for generating response message.
  * @param[in] stopBootOnFault  "StopBootOnFault" from request.
  *
  * @return None.
  */
-inline void setStopBootOnFault(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-                               const std::string& stopBootOnFault)
+inline void
+    setStopBootOnFault(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                       const std::string& stopBootOnFault)
 {
     BMCWEB_LOG_DEBUG("Set Stop Boot On Fault.");
 
@@ -1959,26 +1960,25 @@
     {
         BMCWEB_LOG_DEBUG("Invalid property value for StopBootOnFault: {}",
                          stopBootOnFault);
-        messages::propertyValueNotInList(aResp->res, stopBootOnFault,
+        messages::propertyValueNotInList(asyncResp->res, stopBootOnFault,
                                          "StopBootOnFault");
         return;
     }
 
-    sdbusplus::asio::setProperty(*crow::connections::systemBus,
-                                 "xyz.openbmc_project.Settings",
-                                 "/xyz/openbmc_project/logging/settings",
-                                 "xyz.openbmc_project.Logging.Settings",
-                                 "QuiesceOnHwError", *stopBootEnabled,
-                                 [aResp](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            if (ec.value() != EBADR)
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/logging/settings",
+        "xyz.openbmc_project.Logging.Settings", "QuiesceOnHwError",
+        *stopBootEnabled, [asyncResp](const boost::system::error_code& ec) {
+            if (ec)
             {
-                messages::internalError(aResp->res);
+                if (ec.value() != EBADR)
+                {
+                    messages::internalError(asyncResp->res);
+                }
+                return;
             }
-            return;
-        }
-    });
+        });
 }
 
 /**
