diff options
author | Patrick Venture <venture@google.com> | 2019-01-24 14:11:45 -0800 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2019-01-25 08:27:49 -0800 |
commit | e9764ff47f548c7c2a0e1205a94b75afdf27a993 (patch) | |
tree | 7edb4a7f2bfee36ca92e119dcf8e752d77c80aad /sensor.cpp | |
parent | 9a7ef7c639a5cb538759cf13d078282d69ae6111 (diff) | |
download | phosphor-hwmon-e9764ff47f548c7c2a0e1205a94b75afdf27a993.tar.gz phosphor-hwmon-e9764ff47f548c7c2a0e1205a94b75afdf27a993.zip |
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>
Diffstat (limited to 'sensor.cpp')
-rw-r--r-- | sensor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -39,7 +39,7 @@ Sensor::Sensor(const SensorSet::key_type& sensor, 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); |