diff options
author | Ram Chandrasekar <rkumbako@codeaurora.org> | 2020-09-17 16:13:23 -0700 |
---|---|---|
committer | Ram Chandrasekar <rkumbako@codeaurora.org> | 2020-09-17 16:13:23 -0700 |
commit | 3c5bf0d1e090a13d8a6561ac729e45c791b9ecb2 (patch) | |
tree | 44ea7b584e597c9f0f32278a366ad9f55711facf /thermalCommon.cpp | |
parent | 50998c815ffdcd4f80a91c6223843caf00663a97 (diff) |
thermal-hal: update stoi argument
Thermal sensor reading and cooling device state information are always
decimal and the default stoi assumes them as decimal base. Remove the
input argument of base zero to stoi, since the value of the input is
always fixed.
Change-Id: I29c2ab1de94a1413a43d5355ee08164da0abbca8
Diffstat (limited to 'thermalCommon.cpp')
-rw-r--r-- | thermalCommon.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/thermalCommon.cpp b/thermalCommon.cpp index 6fb0d03..2a3ec38 100644 --- a/thermalCommon.cpp +++ b/thermalCommon.cpp @@ -383,7 +383,7 @@ int ThermalCommon::read_cdev_state(struct therm_cdev *cdev) " for cdev: " << cdev->c.name; return -1; } - cdev->c.value = std::stoi(buf, nullptr, 0); + cdev->c.value = std::stoi(buf); LOG(DEBUG) << "cdev Name:" << cdev->c.name << ". state:" << cdev->c.value << std::endl; @@ -436,7 +436,7 @@ int ThermalCommon::read_temperature(struct therm_sensor *sensor) " for sensor " << sensor->t.name; return -1; } - sensor->t.value = (float)std::stoi(buf, nullptr, 0) / (float)sensor->mulFactor; + sensor->t.value = (float)std::stoi(buf) / (float)sensor->mulFactor; LOG(DEBUG) << "Sensor Name:" << sensor->t.name << ". Temperature:" << (float)sensor->t.value << std::endl; |