Browse Source

[master] Rename RRTTL::MAX() to MAX_TTL() to avoid shadowing

OpenBSD, NetBSD and some builds on MacOS don't like it.
Mukund Sivaraman 12 years ago
parent
commit
55e0fb2472
3 changed files with 3 additions and 3 deletions
  1. 1 1
      src/lib/dns/master_loader.cc
  2. 1 1
      src/lib/dns/rrttl.h
  3. 1 1
      src/lib/dns/tests/rrttl_unittest.cc

+ 1 - 1
src/lib/dns/master_loader.cc

@@ -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,

+ 1 - 1
src/lib/dns/rrttl.h

@@ -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);
     }

+ 1 - 1
src/lib/dns/tests/rrttl_unittest.cc

@@ -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().