From 7895dc70b6616686d93829ff3b05e124b6a0c04e Mon Sep 17 00:00:00 2001 From: Igor Sugak Date: Sat, 7 Jan 2017 21:58:13 -0800 Subject: [PATCH] remove always true if-predicate (gcc-5 -Wlogical-op) Summary: gcc-5 -Wlogical-op reports: ```lang=bash folly/io/async/AsyncSSLSocket.cpp: In member function 'void folly::AsyncSSLSocket::invalidState(folly::AsyncSSLSocket::HandshakeCB*)': folly/io/async/AsyncSSLSocket.cpp:418:35: error: logical 'or' of collectively exhaustive tests is always true [-Werror=logical-op] ``` Reviewed By: yfeldblum Differential Revision: D4391317 fbshipit-source-id: c0f5ce748f1fc21678e4080c7f6351e7fada1e2b --- folly/io/async/AsyncSSLSocket.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/folly/io/async/AsyncSSLSocket.cpp b/folly/io/async/AsyncSSLSocket.cpp index 7bb4ace7..20cc9630 100644 --- a/folly/io/async/AsyncSSLSocket.cpp +++ b/folly/io/async/AsyncSSLSocket.cpp @@ -414,10 +414,7 @@ void AsyncSSLSocket::invalidState(HandshakeCB* callback) { callback->handshakeErr(this, ex); } - // Check the socket state not the ssl state here. - if (state_ != StateEnum::CLOSED || state_ != StateEnum::ERROR) { - failHandshake(__func__, ex); - } + failHandshake(__func__, ex); } void AsyncSSLSocket::sslAccept( -- 2.34.1