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
98bcbd53
Commit
98bcbd53
authored
Jun 04, 2013
by
Marcin Siodelski
Browse files
[2987] Changes as a result of the review.
parent
77def77e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcp/tests/pkt_filter_inet_unittest.cc
View file @
98bcbd53
...
...
@@ -40,16 +40,13 @@ public:
/// @brief Constructor
///
/// This constructor initializes socket_ member to
th
e value
of 0
.
/// This constructor initializes socket_ member to
a negativ
e value.
/// Explcit initialization is performed here because some of the
/// tests do not initialize this value. In such cases, destructor
/// could invoke close() on uninitialized socket descriptor which
/// would result in errors being reported by Valgrind. Note that
/// by initializing the class member to a valid socket descriptor
/// value (non-negative) we avoid Valgrind warning about trying to
/// close the invalid socket descriptor.
/// would result in errors being reported by Valgrind.
PktFilterInetTest
()
:
socket_
(
0
)
{
:
socket_
(
-
1
)
{
// Initialize ifname_ and ifindex_.
loInit
();
}
...
...
@@ -60,7 +57,9 @@ public:
~
PktFilterInetTest
()
{
// Cleanup after each test. This guarantees
// that the socket does not hang after a test.
close
(
socket_
);
if
(
socket_
>=
0
)
{
close
(
socket_
);
}
}
/// @brief Detect loopback interface.
...
...
src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc
View file @
98bcbd53
...
...
@@ -44,16 +44,13 @@ public:
/// @brief Constructor
///
/// This constructor initializes socket_ member to
th
e value
of 0
.
/// This constructor initializes socket_ member to
a negativ
e value.
/// Explcit initialization is performed here because some of the
/// tests do not initialize this value. In such cases, destructor
/// could invoke close() on uninitialized socket descriptor which
/// would result in errors being reported by Valgrind. Note that
/// by initializing the class member to a valid socket descriptor
/// value (non-negative) we avoid Valgrind warning about trying to
/// close the invalid socket descriptor.
/// would result in errors being reported by Valgrind.
PktFilterLPFTest
()
:
socket_
(
0
)
{
:
socket_
(
-
1
)
{
// Initialize ifname_ and ifindex_.
loInit
();
}
...
...
@@ -64,7 +61,9 @@ public:
~
PktFilterLPFTest
()
{
// Cleanup after each test. This guarantees
// that the socket does not hang after a test.
close
(
socket_
);
if
(
socket_
>=
0
)
{
close
(
socket_
);
}
}
/// @brief Detect loopback interface.
...
...
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