]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Rename RRTTL::MAX() to MAX_TTL() to avoid shadowing
authorMukund Sivaraman <muks@isc.org>
Tue, 18 Dec 2012 09:50:51 +0000 (15:20 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 18 Dec 2012 09:50:53 +0000 (15:20 +0530)
OpenBSD, NetBSD and some builds on MacOS don't like it.

src/lib/dns/master_loader.cc
src/lib/dns/rrttl.h
src/lib/dns/tests/rrttl_unittest.cc

index 5ee09f59f3f14888f620981f741ebc3618cac693..247b4c1b9e9897322820134aacf082923244327f 100644 (file)
@@ -208,7 +208,7 @@ private:
     // RR and the lexer is positioned at the next line.  It's just for
     // calculating the accurate source line when callback is necessary.
     void limitTTL(RRTTL& ttl, bool post_parsing) {
-        if (ttl > RRTTL::MAX()) {
+        if (ttl > RRTTL::MAX_TTL()) {
             const size_t src_line = lexer_.getSourceLine() -
                 (post_parsing ? 1 : 0);
             callbacks_.warning(lexer_.getSourceName(), src_line,
index e160a1e1a777840bc0d5ebf518a7d35aaae46a74..7904d848716280b73e01be4bf3c2a221fa19d730 100644 (file)
@@ -293,7 +293,7 @@ public:
     ///
     /// \note At the moment an RRTTL object can have a value larger than
     /// this limit.  We may revisit it in a future version.
-    static const RRTTL& MAX() {
+    static const RRTTL& MAX_TTL() {
         static const RRTTL max_ttl(0x7fffffff);
         return (max_ttl);
     }
index 916f720e6a56c975517b5858881c0a2f651a6a1c..8897102ddeb0230e131c611b5d0b3d6840fcbcfe 100644 (file)
@@ -266,7 +266,7 @@ TEST_F(RRTTLTest, gthan) {
 }
 
 TEST_F(RRTTLTest, maxTTL) {
-    EXPECT_EQ((1u << 31) - 1, RRTTL::MAX().getValue());
+    EXPECT_EQ((1u << 31) - 1, RRTTL::MAX_TTL().getValue());
 }
 
 // test operator<<.  We simply confirm it appends the result of toText().