You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2017/05/11 13:47:51 UTC

[trafficserver] branch master updated: covertiy 1022010 : remove dead code

This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  6890910   covertiy 1022010 : remove dead code
6890910 is described below

commit 6890910a1b174a9afc81159b9cc004db4b962d89
Author: Jason Kenny <dr...@live.com>
AuthorDate: Wed May 10 16:17:38 2017 -0400

    covertiy 1022010 : remove dead code
    
    coverity 1021744 : constructor issues
    clang fix
---
 iocore/net/P_SSLNetVConnection.h | 40 ++++++++++++++++++++--------------------
 iocore/net/SSLNetVConnection.cc  | 18 ------------------
 2 files changed, 20 insertions(+), 38 deletions(-)

diff --git a/iocore/net/P_SSLNetVConnection.h b/iocore/net/P_SSLNetVConnection.h
index 8fc84b5..2c165ad 100644
--- a/iocore/net/P_SSLNetVConnection.h
+++ b/iocore/net/P_SSLNetVConnection.h
@@ -252,13 +252,13 @@ public:
    */
   int populate(Connection &con, Continuation *c, void *arg) override;
 
-  SSL *ssl;
-  ink_hrtime sslHandshakeBeginTime;
-  ink_hrtime sslLastWriteTime;
-  int64_t sslTotalBytesSent;
+  SSL *ssl                         = nullptr;
+  ink_hrtime sslHandshakeBeginTime = 0;
+  ink_hrtime sslLastWriteTime      = 0;
+  int64_t sslTotalBytesSent        = 0;
 
   /// Set by asynchronous hooks to request a specific operation.
-  SslVConnOp hookOpRequested;
+  SslVConnOp hookOpRequested = SSL_HOOK_OP_DEFAULT;
 
 private:
   SSLNetVConnection(const SSLNetVConnection &);
@@ -266,19 +266,19 @@ private:
 
   ts::StringView map_tls_protocol_to_tag(const char *proto_string) const;
 
-  bool sslHandShakeComplete;
-  bool sslClientRenegotiationAbort;
-  bool sslSessionCacheHit;
-  MIOBuffer *handShakeBuffer;
-  IOBufferReader *handShakeHolder;
-  IOBufferReader *handShakeReader;
-  int handShakeBioStored;
+  bool sslHandShakeComplete        = false;
+  bool sslClientRenegotiationAbort = false;
+  bool sslSessionCacheHit          = false;
+  MIOBuffer *handShakeBuffer       = nullptr;
+  IOBufferReader *handShakeHolder  = nullptr;
+  IOBufferReader *handShakeReader  = nullptr;
+  int handShakeBioStored           = 0;
 
-  bool transparentPassThrough;
+  bool transparentPassThrough = false;
 
   /// The current hook.
   /// @note For @C SSL_HOOKS_INVOKE, this is the hook to invoke.
-  class APIHook *curHook;
+  class APIHook *curHook = nullptr;
 
   enum {
     SSL_HOOKS_INIT,     ///< Initial state, no hooks called yet.
@@ -286,7 +286,7 @@ private:
     SSL_HOOKS_ACTIVE,   ///< Hook invoked, waiting for it to complete.
     SSL_HOOKS_CONTINUE, ///< All hooks have been called and completed
     SSL_HOOKS_DONE      ///< All hooks have been called and completed
-  } sslPreAcceptHookState;
+  } sslPreAcceptHookState = SSL_HOOKS_INIT;
 
   enum SSLHandshakeHookState {
     HANDSHAKE_HOOKS_PRE,
@@ -294,12 +294,12 @@ private:
     HANDSHAKE_HOOKS_POST,
     HANDSHAKE_HOOKS_INVOKE,
     HANDSHAKE_HOOKS_DONE
-  } sslHandshakeHookState;
+  } sslHandshakeHookState = HANDSHAKE_HOOKS_PRE;
 
-  const SSLNextProtocolSet *npnSet;
-  Continuation *npnEndpoint;
-  SessionAccept *sessionAcceptPtr;
-  bool sslTrace;
+  const SSLNextProtocolSet *npnSet = nullptr;
+  Continuation *npnEndpoint        = nullptr;
+  SessionAccept *sessionAcceptPtr  = nullptr;
+  bool sslTrace                    = false;
 };
 
 typedef int (SSLNetVConnection::*SSLNetVConnHandler)(int, void *);
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 2467474..dca0f3b 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -591,7 +591,6 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
   }
 
   switch (ret) {
-  case SSL_READ_ERROR_NONE:
   case SSL_READ_READY:
     readReschedule(nh);
     return;
@@ -794,23 +793,6 @@ SSLNetVConnection::load_buffer_and_write(int64_t towrite, MIOBufferAccessor &buf
 }
 
 SSLNetVConnection::SSLNetVConnection()
-  : ssl(nullptr),
-    sslHandshakeBeginTime(0),
-    sslLastWriteTime(0),
-    sslTotalBytesSent(0),
-    hookOpRequested(SSL_HOOK_OP_DEFAULT),
-    sslHandShakeComplete(false),
-    sslClientRenegotiationAbort(false),
-    sslSessionCacheHit(false),
-    handShakeBuffer(nullptr),
-    handShakeHolder(nullptr),
-    handShakeReader(nullptr),
-    handShakeBioStored(0),
-    sslPreAcceptHookState(SSL_HOOKS_INIT),
-    sslHandshakeHookState(HANDSHAKE_HOOKS_PRE),
-    npnSet(nullptr),
-    npnEndpoint(nullptr),
-    sslTrace(false)
 {
 }
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].