Clang-tidy-14 fixes
Do as the robot commands. All changes made automatically by tidy.
Tested: (Thanks Zhikui)
Downloaded and run on system. Sensors scan normally.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I752f37c9e7a95aa3be8e6980ba6e4b2b48b3395a
diff --git a/include/CPUSensor.hpp b/include/CPUSensor.hpp
index c4a47bc..1a98035 100644
--- a/include/CPUSensor.hpp
+++ b/include/CPUSensor.hpp
@@ -46,7 +46,7 @@
size_t pollTime;
bool loggedInterfaceDown = false;
uint8_t minMaxReadCounter{0};
- int fd;
+ int fd{};
void handleResponse(const boost::system::error_code& err);
void checkThresholds(void) override;
void updateMinMaxValues(void);
@@ -100,7 +100,7 @@
{
line.request({"cpusensor", gpiod::line_request::DIRECTION_INPUT,
activeHigh ? 0 : gpiod::line_request::FLAG_ACTIVE_LOW});
- resp = line.get_value();
+ resp = (line.get_value() != 0);
}
catch (const std::system_error&)
{