diff options
author | Chris Xiong <chirs241097@gmail.com> | 2018-07-06 21:25:39 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2018-07-06 21:25:39 +0800 |
commit | b5932d1d22d35cef95eb1cffbf489619b264442d (patch) | |
tree | 6040dc505e9b22875449bcc045fed9b0ac3f0692 /sensors.cpp | |
parent | 61e0a974c07f38b8e42f226d68f22e2d1b26fa6d (diff) | |
download | lightsd-b5932d1d22d35cef95eb1cffbf489619b264442d.tar.xz |
Random code clean-ups to get ready for the next update.
Also tweaked the config a little bit.
Diffstat (limited to 'sensors.cpp')
-rw-r--r-- | sensors.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sensors.cpp b/sensors.cpp index d2166be..615c784 100644 --- a/sensors.cpp +++ b/sensors.cpp @@ -124,16 +124,14 @@ bool SensorBase::init(int id,std::string _sensor_basename) enable_buffer(); devfd=open(devbufpath.c_str(),O_RDONLY); if(!~devfd) - { - LOG('E',"failed to open the iio buffer device: %s",devbufpath.c_str()); - return 1; - } + return LOG('E',"failed to open the iio buffer device: %s",devbufpath.c_str()),1; return 0; } void SensorBase::deinit() { if(~devfd)close(devfd); devfd=-1; + //...also disable iio buffers? } void SensorBase::reset() { |