mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 16:58:02 +02:00
tests: work around coverity false-positives
(cherry picked from commit c7c47575ce)
This commit is contained in:
parent
38fbdc8118
commit
cd8f3cf09f
1 changed files with 10 additions and 9 deletions
|
|
@ -4970,15 +4970,16 @@ test_write_wired_aliases (void)
|
||||||
if (!g_strcmp0 (addrstr, ip[j]))
|
if (!g_strcmp0 (addrstr, ip[j]))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
g_assert (j < num_addresses);
|
if (j >= num_addresses)
|
||||||
|
g_assert_not_reached ();
|
||||||
g_assert_cmpint (nm_ip_address_get_prefix (addr), ==, 24);
|
else {
|
||||||
if (label[j])
|
g_assert_cmpint (nm_ip_address_get_prefix (addr), ==, 24);
|
||||||
g_assert_cmpstr (g_variant_get_string (nm_ip_address_get_attribute (addr, "label"), NULL), ==, label[j]);
|
if (label[j])
|
||||||
else
|
g_assert_cmpstr (g_variant_get_string (nm_ip_address_get_attribute (addr, "label"), NULL), ==, label[j]);
|
||||||
g_assert (nm_ip_address_get_attribute (addr, "label") == NULL);
|
else
|
||||||
|
g_assert (nm_ip_address_get_attribute (addr, "label") == NULL);
|
||||||
ip[j] = NULL;
|
ip[j] = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < num_addresses; i++)
|
for (i = 0; i < num_addresses; i++)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue