Browse Source

[master} Pass ULONG_MAX to MemorySegment->allocate()

This fixes a build failure on the build bots.
Mukund Sivaraman 13 years ago
parent
commit
a5b09a49b4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lib/util/tests/memory_segment_local_unittest.cc

+ 2 - 1
src/lib/util/tests/memory_segment_local_unittest.cc

@@ -16,6 +16,7 @@
 #include <exceptions/exceptions.h>
 #include <gtest/gtest.h>
 #include <memory>
+#include <limits.h>
 
 using namespace std;
 using namespace isc::util;
@@ -56,7 +57,7 @@ TEST(MemorySegmentLocal, TestLocal) {
 TEST(MemorySegmentLocal, TestTooMuchMemory) {
     auto_ptr<MemorySegment> segment(new MemorySegmentLocal());
 
-    EXPECT_THROW(segment->allocate(0x7fffffffffffffff), bad_alloc);
+    EXPECT_THROW(segment->allocate(ULONG_MAX), bad_alloc);
 }
 
 TEST(MemorySegmentLocal, TestBadDeallocate) {