diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-27 15:21:15 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-27 15:21:15 -0400 |
| commit | 42732e05a9a97a18f496eb559a77062a1b4b420e (patch) | |
| tree | 03c8b87c2b26cb43b7b241f5ab0db6583c4b5a30 /tests/lib/test_nexthop_iter.c | |
| parent | 056d8355967b372566a98432f07e4cff66ab17b0 (diff) | |
| parent | 2d6e6d36d7e847b997f29097268dc529bd154d10 (diff) | |
Merge branch 'master' into stylechecker
Diffstat (limited to 'tests/lib/test_nexthop_iter.c')
| -rw-r--r-- | tests/lib/test_nexthop_iter.c | 10 |
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; } |
