hardcode dbus name
The busName variable is only used as the request_name parameter in
the main method, so there is no need to explicitly declare a static
variable.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ice0ef649e6bb648707bd36687fafdeb095254e40
diff --git a/virtualSensor.cpp b/virtualSensor.cpp
index a61527e..7c6d56a 100644
--- a/virtualSensor.cpp
+++ b/virtualSensor.cpp
@@ -5,7 +5,6 @@
#include <fstream>
static constexpr bool DEBUG = false;
-static constexpr auto busName = "xyz.openbmc_project.VirtualSensor";
static constexpr auto sensorDbusPath = "/xyz/openbmc_project/sensors/";
static constexpr auto vsThresholdsIfaceSuffix = ".Thresholds";
static constexpr std::array<const char*, 2> calculationIfaces = {
@@ -1075,7 +1074,7 @@
phosphor::virtualSensor::VirtualSensors virtualSensors(bus);
// Request service bus name
- bus.request_name(busName);
+ bus.request_name("xyz.openbmc_project.VirtualSensor");
// Run the dbus loop.
bus.process_loop();