From: JINMEI Tatuya Date: Tue, 18 Dec 2012 05:47:38 +0000 (-0800) Subject: [2429] some style fixes: return ref from proxy method; add 'u' to numeric val X-Git-Tag: bind10-1.0.0-beta-release~16^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93cbc6cc8a27e8dad8eb0ef10a66655e7fbf6101;p=thirdparty%2Fkea.git [2429] some style fixes: return ref from proxy method; add 'u' to numeric val --- diff --git a/src/lib/dns/rrttl.h b/src/lib/dns/rrttl.h index ed512061d1..e160a1e1a7 100644 --- a/src/lib/dns/rrttl.h +++ b/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); } diff --git a/src/lib/dns/tests/rrttl_unittest.cc b/src/lib/dns/tests/rrttl_unittest.cc index 4c0ff4ded6..916f720e6a 100644 --- a/src/lib/dns/tests/rrttl_unittest.cc +++ b/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().