From 719f187fde2c803e5ceab56ce9e5b30233d7eeca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 29 Oct 2018 17:05:31 +0100 Subject: [PATCH] Flatten the condition to get rid of empty branch --- src/rpc_connection.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/rpc_connection.cpp b/src/rpc_connection.cpp index bf9e4cc..0933162 100644 --- a/src/rpc_connection.cpp +++ b/src/rpc_connection.cpp @@ -26,12 +26,8 @@ void RpcConnection::Open() return; } - if (state == State::Disconnected) { - if (connection->Open()) { - } - else { - return; - } + if (state == State::Disconnected && !connection->Open()) { + return; } if (state == State::SentHandshake) {