From: Igor Sugak Date: Sun, 8 Jan 2017 05:58:13 +0000 (-0800) Subject: remove always true if-predicate (gcc-5 -Wlogical-op) X-Git-Tag: v2017.03.06.00~118 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=7895dc70b6616686d93829ff3b05e124b6a0c04e 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 --- 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(