trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mas...@apache.org
Subject [trafficserver] 12/25: Use std:max instead of internal max macro that was removed
Date Wed, 11 Oct 2017 07:50:45 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 126f29b5d33a2fa9beca5b659bd00266897a574b
Author: Bryan Call <bcall@apache.org>
AuthorDate: Wed Oct 4 10:52:31 2017 -0700

    Use std:max instead of internal max macro that was removed
    
    (cherry picked from commit 57d68dc00c9aad4f70cb9596c6d5b750d23242da)
---
 iocore/net/quic/QUICCrypto.cc       |  2 +-
 iocore/net/quic/QUICLossDetector.cc | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/iocore/net/quic/QUICCrypto.cc b/iocore/net/quic/QUICCrypto.cc
index 02872e7..1cfc2d6 100644
--- a/iocore/net/quic/QUICCrypto.cc
+++ b/iocore/net/quic/QUICCrypto.cc
@@ -166,7 +166,7 @@ QUICCrypto::setup_session()
 
   size_t secret_len = EVP_MD_size(this->_digest);
   size_t key_len    = _get_aead_key_len(this->_aead);
-  size_t iv_len     = max(static_cast<size_t>(8), _get_aead_nonce_len(this->_aead));
+  size_t iv_len     = std::max(static_cast<size_t>(8), _get_aead_nonce_len(this->_aead));
 
   int r = 0;
 
diff --git a/iocore/net/quic/QUICLossDetector.cc b/iocore/net/quic/QUICLossDetector.cc
index ec1e59b..1adb8be 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -104,10 +104,10 @@ QUICLossDetector::_detect_lost_packets(QUICPacketNumber largest_acked_packet_num
   uint32_t delay_until_lost = UINT32_MAX;
 
   if (this->_time_reordering_fraction != INFINITY) {
-    delay_until_lost = (1 + this->_time_reordering_fraction) * max(this->_latest_rtt,
this->_smoothed_rtt);
+    delay_until_lost = (1 + this->_time_reordering_fraction) * std::max(this->_latest_rtt,
this->_smoothed_rtt);
   } else if (largest_acked_packet_number == this->_largest_sent_packet) {
     // Early retransmit alarm.
-    delay_until_lost = 9 / 8 * max(this->_latest_rtt, this->_smoothed_rtt);
+    delay_until_lost = 9 / 8 * std::max(this->_latest_rtt, this->_smoothed_rtt);
   }
   for (auto &unacked : this->_sent_packets) {
     if (unacked.first >= largest_acked_packet_number) {
@@ -284,7 +284,7 @@ QUICLossDetector::_set_loss_detection_alarm()
     } else {
       alarm_duration = 2 * this->_smoothed_rtt;
     }
-    alarm_duration = max(alarm_duration, this->_MIN_TLP_TIMEOUT);
+    alarm_duration = std::max(alarm_duration, this->_MIN_TLP_TIMEOUT);
     alarm_duration = alarm_duration * (1 << this->_handshake_count);
     Debug(tag, "Handshake retransmission alarm will be set");
   } else if (this->_loss_time != 0) {
@@ -298,12 +298,12 @@ QUICLossDetector::_set_loss_detection_alarm()
     } else {
       alarm_duration = this->_MIN_TLP_TIMEOUT;
     }
-    alarm_duration = max(alarm_duration, 2 * this->_smoothed_rtt);
+    alarm_duration = std::max(alarm_duration, 2 * this->_smoothed_rtt);
     Debug(tag, "TLP alarm will be set");
   } else {
     // RTO alarm
     alarm_duration = this->_smoothed_rtt + 4 * this->_rttvar;
-    alarm_duration = max(alarm_duration, this->_MIN_RTO_TIMEOUT);
+    alarm_duration = std::max(alarm_duration, this->_MIN_RTO_TIMEOUT);
     alarm_duration = alarm_duration * (1 << this->_rto_count);
     Debug(tag, "RTO alarm will be set");
   }

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

Mime
View raw message