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

bcall 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 2fd91a3  Cleanup of Continuation class initialization
2fd91a3 is described below

commit 2fd91a3a2fc0e9d7c52a1a1a81f188c23bdc7ecc
Author: Bryan Call <bc...@apache.org>
AuthorDate: Mon Nov 13 10:03:00 2017 +0800

    Cleanup of Continuation class initialization
---
 iocore/eventsystem/I_Continuation.h | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/iocore/eventsystem/I_Continuation.h 
b/iocore/eventsystem/I_Continuation.h
index 1881c3a..9c4e0e2 100644
--- a/iocore/eventsystem/I_Continuation.h
+++ b/iocore/eventsystem/I_Continuation.h
@@ -98,15 +98,15 @@ public:
     The current continuation handler function.
 
     The current handler should not be set directly. In order to
-    change it, first aquire the Continuation's lock and then use
+    change it, first acquire the Continuation's lock and then use
     the SET_HANDLER macro which takes care of the type casting
     issues.
 
   */
-  ContinuationHandler handler;
+  ContinuationHandler handler = nullptr;
 
 #ifdef DEBUG
-  const char *handler_name;
+  const char *handler_name = nullptr;
 #endif
 
   /**
@@ -154,7 +154,7 @@ public:
   }
 
   /**
-    Contructor of the Continuation object. It should not be used
+    Constructor of the Continuation object. It should not be used
     directly. Instead create an object of a derived type.
 
     @param amutex Lock to be set for this Continuation.
@@ -192,23 +192,13 @@ public:
 #define SET_CONTINUATION_HANDLER(_c, _h) (_c->handler = 
((ContinuationHandler)_h))
 #endif
 
-inline Continuation::Continuation(Ptr<ProxyMutex> &amutex)
-  : handler(nullptr),
-#ifdef DEBUG
-    handler_name(nullptr),
-#endif
-    mutex(amutex)
+inline Continuation::Continuation(Ptr<ProxyMutex> &amutex) : mutex(amutex)
 {
   // Pick up the control flags from the creating thread
   this->control_flags.set_flags(get_cont_flags().get_flags());
 }
 
-inline Continuation::Continuation(ProxyMutex *amutex)
-  : handler(nullptr),
-#ifdef DEBUG
-    handler_name(nullptr),
-#endif
-    mutex(amutex)
+inline Continuation::Continuation(ProxyMutex *amutex) : mutex(amutex)
 {
   // Pick up the control flags from the creating thread
   this->control_flags.set_flags(get_cont_flags().get_flags());

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

Reply via email to