Add some const to the nhg copy api.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
return XCALLOC(MTYPE_NEXTHOP_GROUP, sizeof(struct nexthop_group));
}
-void nexthop_group_copy(struct nexthop_group *to, struct nexthop_group *from)
+void nexthop_group_copy(struct nexthop_group *to,
+ const struct nexthop_group *from)
{
/* Copy everything, including recursive info */
copy_nexthops(&to->nexthop, from->nexthop, NULL);
void nexthop_group_delete(struct nexthop_group **nhg);
void nexthop_group_copy(struct nexthop_group *to,
- struct nexthop_group *from);
+ const struct nexthop_group *from);
/*
* Copy a list of nexthops in 'nh' to an nhg, enforcing canonical sort order