BIND 10 trac998, updated. 309b24ff461b623770e950d6ff12654241bdd39b [trac998] Put file-scope data in anonymous namespace

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jun 16 17:59:10 UTC 2011


The branch, trac998 has been updated
       via  309b24ff461b623770e950d6ff12654241bdd39b (commit)
      from  52d165984d1a7784a1a6e0a3b845b19559698203 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 309b24ff461b623770e950d6ff12654241bdd39b
Author: Stephen Morris <stephen at isc.org>
Date:   Thu Jun 16 18:55:37 2011 +0100

    [trac998] Put file-scope data in anonymous namespace

-----------------------------------------------------------------------

Summary of changes:
 src/lib/acl/tests/ip_check_unittest.cc |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/acl/tests/ip_check_unittest.cc b/src/lib/acl/tests/ip_check_unittest.cc
index f9d2964..e58d5a2 100644
--- a/src/lib/acl/tests/ip_check_unittest.cc
+++ b/src/lib/acl/tests/ip_check_unittest.cc
@@ -316,63 +316,67 @@ TEST(IPCheck, V4Compare) {
 
 // Some constants used in the tests
 
-static const char* V6ADDR_1_STRING = "2001:0db8:1122:3344:5566:7788:99aa:bbcc";
-static const uint8_t V6ADDR_1[] = {
+namespace {
+
+const char* V6ADDR_1_STRING = "2001:0db8:1122:3344:5566:7788:99aa:bbcc";
+const uint8_t V6ADDR_1[] = {
     0x20, 0x01, 0x0d, 0xb8, 0x11, 0x22, 0x33, 0x44,
     0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc
 };
 
-static const char* V6ADDR_2_STRING = "2001:0db8::dead:beef";
-static const uint8_t V6ADDR_2[] = {
+const char* V6ADDR_2_STRING = "2001:0db8::dead:beef";
+const uint8_t V6ADDR_2[] = {
     0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0xde, 0xad, 0xbe, 0xef
 };
 
 // Identical to V6ADDR_2 to 48 bits
-static const uint8_t V6ADDR_2_48[] = {
+const uint8_t V6ADDR_2_48[] = {
     0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x55, 0x66,
     0x00, 0x00, 0x00, 0x00, 0xde, 0xad, 0xbe, 0xef
 };
 
 // Identical to V6ADDR_2 to 52 bits
-static const uint8_t V6ADDR_2_52[] = {
+const uint8_t V6ADDR_2_52[] = {
     0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x05, 0x66,
     0x00, 0x00, 0x00, 0x00, 0xde, 0xad, 0xbe, 0xef
 };
 
-static const char* V6ADDR_3_STRING = "::1";
-static const uint8_t V6ADDR_3[] = {
+const char* V6ADDR_3_STRING = "::1";
+const uint8_t V6ADDR_3[] = {
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
 };
 
 
 // Mask with MS bit set
-static const uint8_t MASK_1[] = {
+const uint8_t MASK_1[] = {
     0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static const uint8_t MASK_8[] = {
+const uint8_t MASK_8[] = {
     0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static const uint8_t MASK_48[] = {
+const uint8_t MASK_48[] = {
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static const uint8_t MASK_51[] = {
+const uint8_t MASK_51[] = {
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static const uint8_t MASK_128[] = {
+const uint8_t MASK_128[] = {
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
 };
 
+} // Anonymous namespace
+
 // Check that a default constructor can be instantiated.
 
 TEST(IPCheck, V6ConstructorAddress) {




More information about the bind10-changes mailing list