summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2016-02-12 14:12:22 +0100
committerLubomir Rintel <lkundrak@v3.sk>2016-02-12 15:48:12 +0100
commit86a0a14687093d3aaffc1435af96a51473cdd841 (patch)
treed85b75642d53b1f13e36f63fe26db81aaabc9b79
parent2c2d9d2e4cca422a53968cdcb6def420dd77961e (diff)
downloadNetworkManager-86a0a14687093d3aaffc1435af96a51473cdd841.tar.gz
test: avoid assert with side effect
Not a real problem, but makes Coverity uncomfortable.
-rw-r--r--src/platform/tests/test-address.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/platform/tests/test-address.c b/src/platform/tests/test-address.c
index 566bb479de..681343377c 100644
--- a/src/platform/tests/test-address.c
+++ b/src/platform/tests/test-address.c
@@ -255,7 +255,8 @@ test_ip4_address_peer (void)
/* Add/delete notification */
nmtstp_ip4_address_add (EX, ifindex, addr, IP4_PLEN, addr_peer, lifetime, preferred, NULL);
accept_signal (address_added);
- g_assert ((a = nm_platform_ip4_address_get (NM_PLATFORM_GET, ifindex, addr, IP4_PLEN, addr_peer)));
+ a = nm_platform_ip4_address_get (NM_PLATFORM_GET, ifindex, addr, IP4_PLEN, addr_peer);
+ g_assert (a);
g_assert (!nm_platform_ip4_address_get (NM_PLATFORM_GET, ifindex, addr, IP4_PLEN, addr_peer2));
nmtstp_ip_address_assert_lifetime ((NMPlatformIPAddress *) a, -1, lifetime, preferred);
@@ -263,7 +264,8 @@ test_ip4_address_peer (void)
nmtstp_ip4_address_add (EX, ifindex, addr, IP4_PLEN, addr_peer2, lifetime, preferred, NULL);
accept_signal (address_added);
g_assert (nm_platform_ip4_address_get (NM_PLATFORM_GET, ifindex, addr, IP4_PLEN, addr_peer));
- g_assert ((a = nm_platform_ip4_address_get (NM_PLATFORM_GET, ifindex, addr, IP4_PLEN, addr_peer2)));
+ a = nm_platform_ip4_address_get (NM_PLATFORM_GET, ifindex, addr, IP4_PLEN, addr_peer2);
+ g_assert (a);
nmtstp_ip_address_assert_lifetime ((NMPlatformIPAddress *) a, -1, lifetime, preferred);