Merge pull request #4080 from mjstapp/fix_nh_copy_const

libs: use const in copy_nexthops api
This commit is contained in:
Quentin Young 2019-04-04 13:52:01 -04:00 committed by GitHub
commit ab9bcaf4f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -118,11 +118,11 @@ void nexthop_del(struct nexthop_group *nhg, struct nexthop *nh)
nh->next = NULL;
}
void copy_nexthops(struct nexthop **tnh, struct nexthop *nh,
void copy_nexthops(struct nexthop **tnh, const struct nexthop *nh,
struct nexthop *rparent)
{
struct nexthop *nexthop;
struct nexthop *nh1;
const struct nexthop *nh1;
for (nh1 = nh; nh1; nh1 = nh1->next) {
nexthop = nexthop_new();

View File

@ -44,7 +44,7 @@ void nexthop_group_delete(struct nexthop_group **nhg);
void nexthop_add(struct nexthop **target, struct nexthop *nexthop);
void nexthop_del(struct nexthop_group *nhg, struct nexthop *nexthop);
void copy_nexthops(struct nexthop **tnh, struct nexthop *nh,
void copy_nexthops(struct nexthop **tnh, const struct nexthop *nh,
struct nexthop *rparent);
/* The following for loop allows to iterate over the nexthop