sensor: set scale to 0 in constructor
The _scale member will not be used without ::addValue() being called
first, however, initialize it regardless to 0.
Change-Id: I712e9192500a8a58db03bcbbaf0f0d736f1dfd23
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/sensor.cpp b/sensor.cpp
index 5ca2255..28f1479 100644
--- a/sensor.cpp
+++ b/sensor.cpp
@@ -39,7 +39,7 @@
const hwmonio::HwmonIOInterface* ioAccess,
const std::string& devPath) :
_sensor(sensor),
- _ioAccess(ioAccess), _devPath(devPath)
+ _ioAccess(ioAccess), _devPath(devPath), _scale(0)
{
auto chip = env::getEnv("GPIOCHIP", sensor);
auto access = env::getEnv("GPIO", sensor);