Commit 03f0b4d0 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

Merge branch 'master' into trac2122_2

parents 1100d1a6 0969103b
...@@ -364,7 +364,8 @@ MessageRenderer::writeName(const LabelSequence& ls, const bool compress) { ...@@ -364,7 +364,8 @@ MessageRenderer::writeName(const LabelSequence& ls, const bool compress) {
void void
MessageRenderer::writeName(const Name& name, const bool compress) { MessageRenderer::writeName(const Name& name, const bool compress) {
writeName(LabelSequence(name), compress); const LabelSequence ls(name);
writeName(ls, compress);
} }
AbstractMessageRenderer::AbstractMessageRenderer() : AbstractMessageRenderer::AbstractMessageRenderer() :
......
...@@ -435,7 +435,8 @@ Name::toText(bool omit_final_dot) const { ...@@ -435,7 +435,8 @@ Name::toText(bool omit_final_dot) const {
NameComparisonResult NameComparisonResult
Name::compare(const Name& other) const { Name::compare(const Name& other) const {
return LabelSequence(*this).compare(LabelSequence(other)); LabelSequence ls(*this);
return (ls.compare(LabelSequence(other)));
} }
bool bool
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <memory> #include <memory>
#include <limits.h>
using namespace std; using namespace std;
using namespace isc::util; using namespace isc::util;
...@@ -56,7 +57,7 @@ TEST(MemorySegmentLocal, TestLocal) { ...@@ -56,7 +57,7 @@ TEST(MemorySegmentLocal, TestLocal) {
TEST(MemorySegmentLocal, TestTooMuchMemory) { TEST(MemorySegmentLocal, TestTooMuchMemory) {
auto_ptr<MemorySegment> segment(new MemorySegmentLocal()); auto_ptr<MemorySegment> segment(new MemorySegmentLocal());
EXPECT_THROW(segment->allocate(0x7fffffffffffffff), bad_alloc); EXPECT_THROW(segment->allocate(ULONG_MAX), bad_alloc);
} }
TEST(MemorySegmentLocal, TestBadDeallocate) { TEST(MemorySegmentLocal, TestBadDeallocate) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment