about summary refs log tree commit diff
path: root/src/core/platform/tests/test-address.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2023-02-10 11:51:50 +0100
committerMichael Biebl <biebl@debian.org>2023-02-10 11:51:50 +0100
commit58dddb802071d967ff5731f3333239ead78248e8 (patch)
treedef9e578e4786f8cbc56ce1b6cabf7670e00ae81 /src/core/platform/tests/test-address.c
parent2c1b7a7ea3c332b4d690c0595ef76c81de1f0cc8 (diff)
parent1372848511cb896b80b51ed1a3e9606bd9816631 (diff)
Update upstream source from tag 'upstream/1.42.0'
Update to upstream version '1.42.0'
with Debian dir 2b9fa2718b2bd34fa58008e335a0d81b87ad57cf
Diffstat (limited to 'src/core/platform/tests/test-address.c')
-rw-r--r--src/core/platform/tests/test-address.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/platform/tests/test-address.c b/src/core/platform/tests/test-address.c
index 700891e8..0bce00c4 100644
--- a/src/core/platform/tests/test-address.c
+++ b/src/core/platform/tests/test-address.c
@@ -118,7 +118,7 @@ test_ip4_address_general(void)
     addresses = nmtstp_platform_ip4_address_get_all(NM_PLATFORM_GET, ifindex);
     g_assert(addresses);
     g_assert_cmpint(addresses->len, ==, 1);
-    address = &g_array_index(addresses, NMPlatformIP4Address, 0);
+    address = &nm_g_array_first(addresses, NMPlatformIP4Address);
     g_assert_cmpint(address->ifindex, ==, ifindex);
     g_assert_cmphex(address->address, ==, addr);
     g_assert_cmphex(address->peer_address, ==, addr);
@@ -193,7 +193,7 @@ test_ip6_address_general(void)
     addresses = nmtstp_platform_ip6_address_get_all(NM_PLATFORM_GET, ifindex);
     g_assert(addresses);
     g_assert_cmpint(addresses->len, ==, 1);
-    address = &g_array_index(addresses, NMPlatformIP6Address, 0);
+    address = &nm_g_array_first(addresses, NMPlatformIP6Address);
     g_assert_cmpint(address->ifindex, ==, ifindex);
     g_assert(!memcmp(&address->address, &addr, sizeof(addr)));
     g_assert_cmpint(address->plen, ==, IP6_PLEN);
@@ -453,7 +453,7 @@ _nmtstp_init_tests(int *argc, char ***argv)
 void
 _nmtstp_setup_tests(void)
 {
-#define add_test_func(testpath, test_func) nmtstp_env1_add_test_func(testpath, test_func, FALSE)
+#define add_test_func(testpath, test_func) nmtstp_env1_add_test_func(testpath, test_func, 1, FALSE)
     add_test_func("/address/ipv4/general", test_ip4_address_general);
     add_test_func("/address/ipv6/general", test_ip6_address_general);