Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
b0c3a42e
Commit
b0c3a42e
authored
May 14, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: C4800 warnings in unittest_ip_resolver.cpp
Solution: make proper boolean expression
parent
c589f2b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
unittest_ip_resolver.cpp
unittests/unittest_ip_resolver.cpp
+10
-11
No files found.
unittests/unittest_ip_resolver.cpp
View file @
b0c3a42e
...
@@ -64,7 +64,7 @@ class test_ip_resolver_t : public zmq::ip_resolver_t
...
@@ -64,7 +64,7 @@ class test_ip_resolver_t : public zmq::ip_resolver_t
assert
(
service_
==
NULL
);
assert
(
service_
==
NULL
);
bool
ipv6
=
(
hints_
->
ai_family
==
AF_INET6
);
bool
ipv6
=
(
hints_
->
ai_family
==
AF_INET6
);
bool
no_dns
=
hints_
->
ai_flags
&
AI_NUMERICHOST
;
bool
no_dns
=
(
hints_
->
ai_flags
&
AI_NUMERICHOST
)
!=
0
;
const
char
*
ip
=
NULL
;
const
char
*
ip
=
NULL
;
if
(
!
no_dns
)
{
if
(
!
no_dns
)
{
...
@@ -156,9 +156,8 @@ static void test_resolve (zmq::ip_resolver_options_t opts_,
...
@@ -156,9 +156,8 @@ static void test_resolve (zmq::ip_resolver_options_t opts_,
TEST_ASSERT_EQUAL
(
0
,
rc
);
TEST_ASSERT_EQUAL
(
0
,
rc
);
}
}
validate_address
(
family
,
&
addr
,
expected_addr_
,
validate_address
(
family
,
&
addr
,
expected_addr_
,
expected_port_
,
expected_port_
,
expected_zone_
,
expected_zone_
,
expected_addr_v4_failover_
);
expected_addr_v4_failover_
);
}
}
// Helper macro to define the v4/v6 function pairs
// Helper macro to define the v4/v6 function pairs
...
@@ -167,7 +166,7 @@ static void test_resolve (zmq::ip_resolver_options_t opts_,
...
@@ -167,7 +166,7 @@ static void test_resolve (zmq::ip_resolver_options_t opts_,
\
\
static void _test##_ipv6 () { _test (true); }
static void _test##_ipv6 () { _test (true); }
static
void
test_bind_any
(
int
ipv6_
)
static
void
test_bind_any
(
bool
ipv6_
)
{
{
zmq
::
ip_resolver_options_t
resolver_opts
;
zmq
::
ip_resolver_options_t
resolver_opts
;
...
@@ -178,7 +177,7 @@ static void test_bind_any (int ipv6_)
...
@@ -178,7 +177,7 @@ static void test_bind_any (int ipv6_)
}
}
MAKE_TEST_V4V6
(
test_bind_any
)
MAKE_TEST_V4V6
(
test_bind_any
)
static
void
test_bind_any_port0
(
int
ipv6_
)
static
void
test_bind_any_port0
(
bool
ipv6_
)
{
{
zmq
::
ip_resolver_options_t
resolver_opts
;
zmq
::
ip_resolver_options_t
resolver_opts
;
...
@@ -190,7 +189,7 @@ static void test_bind_any_port0 (int ipv6_)
...
@@ -190,7 +189,7 @@ static void test_bind_any_port0 (int ipv6_)
}
}
MAKE_TEST_V4V6
(
test_bind_any_port0
)
MAKE_TEST_V4V6
(
test_bind_any_port0
)
static
void
test_nobind_any
(
int
ipv6_
)
static
void
test_nobind_any
(
bool
ipv6_
)
{
{
zmq
::
ip_resolver_options_t
resolver_opts
;
zmq
::
ip_resolver_options_t
resolver_opts
;
...
@@ -202,7 +201,7 @@ static void test_nobind_any (int ipv6_)
...
@@ -202,7 +201,7 @@ static void test_nobind_any (int ipv6_)
}
}
MAKE_TEST_V4V6
(
test_nobind_any
)
MAKE_TEST_V4V6
(
test_nobind_any
)
static
void
test_nobind_any_port
(
int
ipv6_
)
static
void
test_nobind_any_port
(
bool
ipv6_
)
{
{
zmq
::
ip_resolver_options_t
resolver_opts
;
zmq
::
ip_resolver_options_t
resolver_opts
;
...
@@ -214,7 +213,7 @@ static void test_nobind_any_port (int ipv6_)
...
@@ -214,7 +213,7 @@ static void test_nobind_any_port (int ipv6_)
}
}
MAKE_TEST_V4V6
(
test_nobind_any_port
)
MAKE_TEST_V4V6
(
test_nobind_any_port
)
static
void
test_nobind_addr_anyport
(
int
ipv6_
)
static
void
test_nobind_addr_anyport
(
bool
ipv6_
)
{
{
zmq
::
ip_resolver_options_t
resolver_opts
;
zmq
::
ip_resolver_options_t
resolver_opts
;
...
@@ -225,7 +224,7 @@ static void test_nobind_addr_anyport (int ipv6_)
...
@@ -225,7 +224,7 @@ static void test_nobind_addr_anyport (int ipv6_)
}
}
MAKE_TEST_V4V6
(
test_nobind_addr_anyport
)
MAKE_TEST_V4V6
(
test_nobind_addr_anyport
)
static
void
test_nobind_addr_port0
(
int
ipv6_
)
static
void
test_nobind_addr_port0
(
bool
ipv6_
)
{
{
zmq
::
ip_resolver_options_t
resolver_opts
;
zmq
::
ip_resolver_options_t
resolver_opts
;
...
@@ -746,7 +745,7 @@ void test_dns_brackets_port_bad ()
...
@@ -746,7 +745,7 @@ void test_dns_brackets_port_bad ()
test_resolve
(
resolver_opts
,
"[ip.zeromq.org:22]"
,
NULL
);
test_resolve
(
resolver_opts
,
"[ip.zeromq.org:22]"
,
NULL
);
}
}
void
test_dns_deny
(
int
ipv6_
)
void
test_dns_deny
(
bool
ipv6_
)
{
{
zmq
::
ip_resolver_options_t
resolver_opts
;
zmq
::
ip_resolver_options_t
resolver_opts
;
...
...
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