diff options
-rw-r--r-- | src/core/platform/tests/test-link.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/platform/tests/test-link.c b/src/core/platform/tests/test-link.c index eb351eaa7d..c38fde42b5 100644 --- a/src/core/platform/tests/test-link.c +++ b/src/core/platform/tests/test-link.c @@ -2588,6 +2588,7 @@ test_link_set_properties(void) const NMPlatformLink *link; NMPlatformLinkProps props; NMPlatformLinkChangeFlags flags; + int ifindex; props = (NMPlatformLinkProps){ .tx_queue_length = 599, @@ -2597,10 +2598,10 @@ test_link_set_properties(void) flags = NM_PLATFORM_LINK_CHANGE_TX_QUEUE_LENGTH | NM_PLATFORM_LINK_CHANGE_GSO_MAX_SIZE | NM_PLATFORM_LINK_CHANGE_GSO_MAX_SEGMENTS; - link = nmtstp_link_dummy_add(NM_PLATFORM_GET, FALSE, "dummy1"); - g_assert(nm_platform_link_change(NM_PLATFORM_GET, link->ifindex, &props, flags)); + ifindex = nmtstp_link_dummy_add(NM_PLATFORM_GET, FALSE, "dummy1")->ifindex; + g_assert(nm_platform_link_change(NM_PLATFORM_GET, ifindex, &props, flags)); - link = nmtstp_link_get(NM_PLATFORM_GET, link->ifindex, "dummy1"); + link = nmtstp_link_get(NM_PLATFORM_GET, ifindex, "dummy1"); g_assert(link); g_assert_cmpint(link->link_props.tx_queue_length, ==, 599); g_assert_cmpint(link->link_props.gso_max_size, ==, 10001); |