You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2021/02/04 18:44:59 UTC

[trafficserver] 01/01: slice/Range: change maxval to use defined value instead of numeric_limits

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

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

commit 16f5bb0e1c133060cbf968ed02fba9f664f5b459
Author: Brian Olsen <br...@comcast.com>
AuthorDate: Thu Feb 4 18:44:24 2021 +0000

    slice/Range: change maxval to use defined value instead of numeric_limits
---
 plugins/experimental/slice/Range.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/experimental/slice/Range.h b/plugins/experimental/slice/Range.h
index ba581c6..6bba4c6 100644
--- a/plugins/experimental/slice/Range.h
+++ b/plugins/experimental/slice/Range.h
@@ -20,7 +20,7 @@
 
 #include "ts/ts.h"
 
-#include <limits>
+#include <climits>
 
 /**
   represents a value parsed from a Range request header field.
@@ -29,7 +29,7 @@
 
 struct Range {
 public:
-  static int64_t constexpr maxval = (std::numeric_limits<int64_t>::max() >> 2);
+  static int64_t constexpr maxval = {static_cast<int64_t>(LLONG_MAX) / 2};
 
   int64_t m_beg{-1};
   int64_t m_end{-1}; // half open