mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 07:48:07 +00:00
libs: use const in copy_nexthops api
Use const for the source arg to copy_nexthops(). Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
59d11e7cd1
commit
deff170e8b
@ -118,11 +118,11 @@ void nexthop_del(struct nexthop_group *nhg, struct nexthop *nh)
|
|||||||
nh->next = NULL;
|
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 *rparent)
|
||||||
{
|
{
|
||||||
struct nexthop *nexthop;
|
struct nexthop *nexthop;
|
||||||
struct nexthop *nh1;
|
const struct nexthop *nh1;
|
||||||
|
|
||||||
for (nh1 = nh; nh1; nh1 = nh1->next) {
|
for (nh1 = nh; nh1; nh1 = nh1->next) {
|
||||||
nexthop = nexthop_new();
|
nexthop = nexthop_new();
|
||||||
|
@ -44,7 +44,7 @@ void nexthop_group_delete(struct nexthop_group **nhg);
|
|||||||
|
|
||||||
void nexthop_add(struct nexthop **target, struct nexthop *nexthop);
|
void nexthop_add(struct nexthop **target, struct nexthop *nexthop);
|
||||||
void nexthop_del(struct nexthop_group *nhg, 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);
|
struct nexthop *rparent);
|
||||||
|
|
||||||
/* The following for loop allows to iterate over the nexthop
|
/* The following for loop allows to iterate over the nexthop
|
||||||
|
Loading…
Reference in New Issue
Block a user