BIND 10 trac2088, updated. 16f7c0656669ebe1e93ba9f88a35072311bb2f03 [2088] Fix coding style issues

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Jul 9 02:14:26 UTC 2012


The branch, trac2088 has been updated
       via  16f7c0656669ebe1e93ba9f88a35072311bb2f03 (commit)
       via  093aab9cf5593c305e7cf6576ed339fec181979c (commit)
      from  05a1e1a98e21ff9d5591af9c5debdbf74eb9cb77 (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 16f7c0656669ebe1e93ba9f88a35072311bb2f03
Author: Mukund Sivaraman <muks at isc.org>
Date:   Mon Jul 9 07:42:53 2012 +0530

    [2088] Fix coding style issues

commit 093aab9cf5593c305e7cf6576ed339fec181979c
Author: Mukund Sivaraman <muks at isc.org>
Date:   Mon Jul 9 07:42:32 2012 +0530

    [2088] Put test in anonymous namespace

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

Summary of changes:
 src/lib/util/memory_segment_local.cc               |    2 +-
 .../util/tests/memory_segment_local_unittest.cc    |   11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/util/memory_segment_local.cc b/src/lib/util/memory_segment_local.cc
index f29c1c3..a7fbacd 100644
--- a/src/lib/util/memory_segment_local.cc
+++ b/src/lib/util/memory_segment_local.cc
@@ -19,7 +19,7 @@ namespace util {
 
 void*
 MemorySegmentLocal::allocate(size_t size) {
-    void *ptr = malloc(size);
+    void* ptr = malloc(size);
 
     if (ptr != NULL) {
         allocated_size_ += size;
diff --git a/src/lib/util/tests/memory_segment_local_unittest.cc b/src/lib/util/tests/memory_segment_local_unittest.cc
index 95736cf..dcc42e8 100644
--- a/src/lib/util/tests/memory_segment_local_unittest.cc
+++ b/src/lib/util/tests/memory_segment_local_unittest.cc
@@ -17,9 +17,9 @@
 #include <memory>
 
 using namespace std;
+using namespace isc::util;
 
-namespace isc {
-namespace util {
+namespace {
 
 TEST(MemorySegmentLocal, TestLocal) {
     auto_ptr<MemorySegment> segment(new MemorySegmentLocal());
@@ -27,12 +27,12 @@ TEST(MemorySegmentLocal, TestLocal) {
     // By default, nothing is allocated.
     EXPECT_TRUE(segment->allMemoryDeallocated());
 
-    void *ptr = segment->allocate(1024);
+    void* ptr = segment->allocate(1024);
 
     // Now, we have an allocation:
     EXPECT_FALSE(segment->allMemoryDeallocated());
 
-    void *ptr2 = segment->allocate(42);
+    void* ptr2 = segment->allocate(42);
 
     // Still:
     EXPECT_FALSE(segment->allMemoryDeallocated());
@@ -52,5 +52,4 @@ TEST(MemorySegmentLocal, TestLocal) {
     EXPECT_TRUE(segment->allMemoryDeallocated());
 }
 
-} // namespace util
-} // namespace isc
+} // anonymous namespace



More information about the bind10-changes mailing list