summaryrefslogtreecommitdiffstats
path: root/src/can-utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/can-utils.cpp')
-rw-r--r--src/can-utils.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/can-utils.cpp b/src/can-utils.cpp
index 8bf05670..8a91bd15 100644
--- a/src/can-utils.cpp
+++ b/src/can-utils.cpp
@@ -191,7 +191,10 @@ int can_bus_t::init_can_dev()
for(const auto& device : devices_name)
{
can_bus_dev_t can_bus_device_handler(device);
- (can_bus_device_handler.open()) ? i++ : ERROR(binder_interface, "Can't open device %s", device);
+ if (can_bus_device_handler.open())
+ i++;
+ else
+ ERROR(binder_interface, "Can't open device %s", device);
can_bus_device_handler.start_reading(std::ref(*this));
}
can_frame_mutex.unlock();