Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Adam Osuchowski
Kea
Commits
3b8787a7
Commit
3b8787a7
authored
Nov 30, 2016
by
Francis Dupont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[4631b] Applied the not unique_ptr stuff
parent
cbba4ee6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
src/lib/dhcp/iface_mgr_linux.cc
src/lib/dhcp/iface_mgr_linux.cc
+2
-2
src/lib/dhcp/tests/duid_unittest.cc
src/lib/dhcp/tests/duid_unittest.cc
+2
-2
src/lib/util/tests/memory_segment_local_unittest.cc
src/lib/util/tests/memory_segment_local_unittest.cc
+6
-5
No files found.
src/lib/dhcp/iface_mgr_linux.cc
View file @
3b8787a7
// 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 @
3b8787a7
// 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_LE
N'
// 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 @
3b8787a7
// 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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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