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) {
void
MessageRenderer::writeName(const Name& name, const bool compress) {
writeName(LabelSequence(name), compress);
const LabelSequence ls(name);
writeName(ls, compress);
}
AbstractMessageRenderer::AbstractMessageRenderer() :
......
......@@ -435,7 +435,8 @@ Name::toText(bool omit_final_dot) const {
NameComparisonResult
Name::compare(const Name& other) const {
return LabelSequence(*this).compare(LabelSequence(other));
LabelSequence ls(*this);
return (ls.compare(LabelSequence(other)));
}
bool
......
......@@ -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) {
......
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