]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: use const in nexthop_group copy api
authorMark Stapp <mjs@voltanet.io>
Tue, 25 Feb 2020 13:26:38 +0000 (08:26 -0500)
committerMark Stapp <mjs@voltanet.io>
Tue, 25 Feb 2020 13:26:38 +0000 (08:26 -0500)
Add some const to the nhg copy api.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
lib/nexthop_group.c
lib/nexthop_group.h

index 3005a51c716987196148c485a73c28ddf076f1f8..d660428bcddbb23b0672366a225fb76fe709011a 100644 (file)
@@ -216,7 +216,8 @@ struct nexthop_group *nexthop_group_new(void)
        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);
index 73b020283a98f1a4fb72f519ed3866e116683f81..f99a53f694f8a24456468147643557ae747507fd 100644 (file)
@@ -43,7 +43,7 @@ struct nexthop_group *nexthop_group_new(void);
 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