Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
e348313f
Commit
e348313f
authored
Dec 08, 2016
by
Francis Dupont
Browse files
[master] Merged trac4631b (C++11 2nd phase)
parents
9be11b73
3b8787a7
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcp/iface_mgr_linux.cc
View file @
e348313f
// Copyright (C) 2011-201
5
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-201
6
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -143,7 +143,7 @@ void Netlink::rtnl_open_socket() {
local_
.
nl_family
=
AF_NETLINK
;
local_
.
nl_groups
=
0
;
if
(
bind
(
fd_
,
convertSockAddr
(
&
local_
),
sizeof
(
local_
))
<
0
)
{
if
(
::
bind
(
fd_
,
convertSockAddr
(
&
local_
),
sizeof
(
local_
))
<
0
)
{
isc_throw
(
Unexpected
,
"Failed to bind netlink socket."
);
}
...
...
src/lib/dhcp/tests/duid_unittest.cc
View file @
e348313f
// Copyright (C) 2011-201
5
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-201
6
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -31,7 +31,7 @@ namespace {
// This is a workaround for strange linking problems with gtest:
// libdhcp___unittests-duid_unittest.o: In function `Compare<long unsigned int, long unsigned int>':
// ~/gtest-1.6.0/include/gtest/gtest.h:1353: undefined reference to `isc::dhcp::ClientId::MAX_CLIENT_ID_LE
'
N
// ~/gtest-1.6.0/include/gtest/gtest.h:1353: undefined reference to `isc::dhcp::ClientId::MAX_CLIENT_ID_LEN
'
// collect2: ld returned 1 exit status
const
size_t
MAX_DUID_LEN
=
DUID
::
MAX_DUID_LEN
;
...
...
src/lib/util/tests/memory_segment_local_unittest.cc
View file @
e348313f
// Copyright (C) 2012-201
5
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012-201
6
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -9,6 +9,7 @@
#include
<util/memory_segment_local.h>
#include
<exceptions/exceptions.h>
#include
<gtest/gtest.h>
#include
<boost/scoped_ptr.hpp>
#include
<memory>
#include
<limits.h>
...
...
@@ -18,7 +19,7 @@ using namespace isc::util;
namespace
{
TEST
(
MemorySegmentLocal
,
TestLocal
)
{
auto
_ptr
<
MemorySegment
>
segment
(
new
MemorySegmentLocal
());
boost
::
scoped
_ptr
<
MemorySegment
>
segment
(
new
MemorySegmentLocal
());
// By default, nothing is allocated.
EXPECT_TRUE
(
segment
->
allMemoryDeallocated
());
...
...
@@ -50,7 +51,7 @@ TEST(MemorySegmentLocal, TestLocal) {
/// @todo: disabled, see ticket #3510
TEST
(
MemorySegmentLocal
,
DISABLED_TestTooMuchMemory
)
{
auto
_ptr
<
MemorySegment
>
segment
(
new
MemorySegmentLocal
());
boost
::
scoped
_ptr
<
MemorySegment
>
segment
(
new
MemorySegmentLocal
());
// Although it should be perfectly fine to use the ULONG_MAX
// instead of LONG_MAX as the size_t value should be unsigned,
...
...
@@ -61,7 +62,7 @@ TEST(MemorySegmentLocal, DISABLED_TestTooMuchMemory) {
}
TEST
(
MemorySegmentLocal
,
TestBadDeallocate
)
{
auto
_ptr
<
MemorySegment
>
segment
(
new
MemorySegmentLocal
());
boost
::
scoped
_ptr
<
MemorySegment
>
segment
(
new
MemorySegmentLocal
());
// By default, nothing is allocated.
EXPECT_TRUE
(
segment
->
allMemoryDeallocated
());
...
...
@@ -94,7 +95,7 @@ TEST(MemorySegmentLocal, TestBadDeallocate) {
}
TEST
(
MemorySegmentLocal
,
TestNullDeallocate
)
{
auto
_ptr
<
MemorySegment
>
segment
(
new
MemorySegmentLocal
());
boost
::
scoped
_ptr
<
MemorySegment
>
segment
(
new
MemorySegmentLocal
());
// By default, nothing is allocated.
EXPECT_TRUE
(
segment
->
allMemoryDeallocated
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment