aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/hw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/vom/hw.cpp')
-rw-r--r--src/vpp-api/vom/hw.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/vpp-api/vom/hw.cpp b/src/vpp-api/vom/hw.cpp
index 8f64a75c092..0952b60f9d9 100644
--- a/src/vpp-api/vom/hw.cpp
+++ b/src/vpp-api/vom/hw.cpp
@@ -74,16 +74,14 @@ HW::cmd_q::enqueue(std::queue<cmd*>& cmds)
bool
HW::cmd_q::connect()
{
- int rv;
-
if (m_connected)
return m_connected;
- rv = m_conn.connect();
-
- m_connected = true;
- m_rx_thread.reset(new std::thread(&HW::cmd_q::rx_run, this));
- return (rv == 0);
+ if (0 == m_conn.connect()) {
+ m_connected = true;
+ m_rx_thread.reset(new std::thread(&HW::cmd_q::rx_run, this));
+ }
+ return (m_connected);
}
void