summaryrefslogtreecommitdiff
path: root/tests/lib/test_nexthop_iter.c
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2018-03-10 04:03:41 +0000
committervivek <vivek@cumulusnetworks.com>2018-03-10 04:03:41 +0000
commit4e262455a252c700f81df75fb8107d112062bba8 (patch)
treefbd55c66eebe78ccb60424e560548d1613aa403a /tests/lib/test_nexthop_iter.c
parentbfd498f0dab9a1937c6036cd35ed020b64a69e8f (diff)
parent58e7db106d5907cb129fcc316f02ce0bf34e3885 (diff)
Merge branch 'master' of https://github.com/frrouting/frr into evpn-ipv6-tenant-routing
Conflicts: bgpd/bgp_evpn.c
Diffstat (limited to 'tests/lib/test_nexthop_iter.c')
-rw-r--r--tests/lib/test_nexthop_iter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/test_nexthop_iter.c b/tests/lib/test_nexthop_iter.c
index 8d7353d4dc..f21f3bbb33 100644
--- a/tests/lib/test_nexthop_iter.c
+++ b/tests/lib/test_nexthop_iter.c
@@ -60,7 +60,7 @@ static void str_appendf(char **buf, const char *format, ...)
* and its expected representation */
struct nexthop_chain {
/* Head of the chain */
- struct nexthop *head;
+ struct nexthop_group head;
/* Last nexthop in top chain */
struct nexthop *current_top;
/* Last nexthop in current recursive chain */
@@ -85,12 +85,12 @@ static void nexthop_chain_add_top(struct nexthop_chain *nc)
nh = calloc(sizeof(*nh), 1);
assert(nh);
- if (nc->head) {
+ if (nc->head.nexthop) {
nc->current_top->next = nh;
nh->prev = nc->current_top;
nc->current_top = nh;
} else {
- nc->head = nc->current_top = nh;
+ nc->head.nexthop = nc->current_top = nh;
}
nc->current_recursive = NULL;
str_appendf(&nc->repr, "%p\n", nh);
@@ -166,8 +166,8 @@ static void nexthop_clear_recursive(struct nexthop *tcur)
}
static void nexthop_chain_clear(struct nexthop_chain *nc)
{
- nexthop_clear_recursive(nc->head);
- nc->head = nc->current_top = nc->current_recursive = NULL;
+ nexthop_clear_recursive(nc->head.nexthop);
+ nc->head.nexthop = nc->current_top = nc->current_recursive = NULL;
free(nc->repr);
nc->repr = NULL;
}