trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mas...@apache.org
Subject [trafficserver] 05/25: Initialize all members in QUICLossDetector and clean up to use C++11 assignment initialization
Date Wed, 11 Oct 2017 07:50:38 GMT
This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch quic-05
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 6341bbe63bd2358184cd6b0d0341f9c9f1848c49
Author: Bryan Call <bcall@apache.org>
AuthorDate: Tue Oct 3 15:33:09 2017 -0700

    Initialize all members in QUICLossDetector and clean up to use C++11
    assignment initialization
    
    (cherry picked from commit 155d69971f4cfb656c97c7583ea975643e168840)
---
 iocore/net/quic/QUICLossDetector.cc | 10 ----------
 iocore/net/quic/QUICLossDetector.h  | 24 ++++++++++++------------
 2 files changed, 12 insertions(+), 22 deletions(-)

diff --git a/iocore/net/quic/QUICLossDetector.cc b/iocore/net/quic/QUICLossDetector.cc
index 33d923d..ec1e59b 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -31,10 +31,6 @@ QUICLossDetector::QUICLossDetector(QUICPacketTransmitter *transmitter)
: _transm
 {
   this->mutex = new_ProxyMutex();
 
-  this->_loss_detection_alarm = nullptr;
-  this->_handshake_count      = 0;
-  this->_tlp_count            = 0;
-  this->_rto_count            = 0;
   if (this->_time_loss_detection) {
     this->_reordering_threshold     = UINT32_MAX;
     this->_time_reordering_fraction = this->_TIME_REORDERING_FRACTION;
@@ -42,12 +38,6 @@ QUICLossDetector::QUICLossDetector(QUICPacketTransmitter *transmitter)
: _transm
     this->_reordering_threshold     = this->_REORDERING_THRESHOLD;
     this->_time_reordering_fraction = INFINITY;
   }
-  this->_loss_time                = 0;
-  this->_smoothed_rtt             = 0;
-  this->_rttvar                   = 0;
-  this->_largest_sent_before_rto  = 0;
-  this->_time_of_last_sent_packet = 0;
-  this->_largest_sent_packet      = 0;
 
   SET_HANDLER(&QUICLossDetector::event_handler);
 }
diff --git a/iocore/net/quic/QUICLossDetector.h b/iocore/net/quic/QUICLossDetector.h
index 7313694..1ffa8eb 100644
--- a/iocore/net/quic/QUICLossDetector.h
+++ b/iocore/net/quic/QUICLossDetector.h
@@ -74,20 +74,20 @@ private:
   ink_hrtime _DEFAULT_INITIAL_RTT  = HRTIME_MSECONDS(100);
 
   // 3.2.2.  Variables of interest
-  Action *_loss_detection_alarm;
-  uint32_t _handshake_count = 0;
-  uint32_t _tlp_count       = 0;
-  uint32_t _rto_count       = 0;
-  uint32_t _largest_sent_before_rto;
-  uint32_t _largest_sent_packet;
-  uint32_t _largest_acked_packet;
-  uint32_t _time_of_last_sent_packet;
-  ink_hrtime _latest_rtt;
-  ink_hrtime _smoothed_rtt;
-  uint32_t _rttvar;
+  Action *_loss_detection_alarm      = nullptr;
+  uint32_t _handshake_count          = 0;
+  uint32_t _tlp_count                = 0;
+  uint32_t _rto_count                = 0;
+  uint32_t _largest_sent_before_rto  = 0;
+  uint32_t _largest_sent_packet      = 0;
+  uint32_t _largest_acked_packet     = 0;
+  uint32_t _time_of_last_sent_packet = 0;
+  ink_hrtime _latest_rtt             = 0;
+  ink_hrtime _smoothed_rtt           = 0;
+  uint32_t _rttvar                   = 0;
   uint32_t _reordering_threshold;
   double _time_reordering_fraction;
-  ink_hrtime _loss_time;
+  ink_hrtime _loss_time = 0;
   std::map<QUICPacketNumber, std::unique_ptr<PacketInfo>> _sent_packets;
 
   uint32_t _handshake_outstanding       = 0;

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

Mime
View raw message