Browse Source

[2429] some style fixes: return ref from proxy method; add 'u' to numeric val

JINMEI Tatuya 12 years ago
parent
commit
93cbc6cc8a
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/lib/dns/rrttl.h
  2. 1 1
      src/lib/dns/tests/rrttl_unittest.cc

+ 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() {
         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((1 << 31) - 1, RRTTL::MAX().getValue());
+    EXPECT_EQ((1u << 31) - 1, RRTTL::MAX().getValue());
 }
 
 // test operator<<.  We simply confirm it appends the result of toText().