summaryrefslogtreecommitdiff
path: root/lib/nexthop.h
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-10-23 14:37:20 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2019-10-25 11:13:44 -0400
commit17c25e0368e765ec23b7c94e65f5d4e44102f77e (patch)
tree36128bfd33ab2aa3697cfe2b3672797df4461ca3 /lib/nexthop.h
parent0b4dadb3858667a858c20aac9c6b854aaf2ebdf9 (diff)
lib: Make nexthop_next* use const for nexthop
Make nexthop_next() and nexthop_next_active_resolved() use const for the nexthop argument. They should not be modifying so it makes sense here. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop.h')
-rw-r--r--lib/nexthop.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h
index 480c4cc3dd..fe029f1867 100644
--- a/lib/nexthop.h
+++ b/lib/nexthop.h
@@ -161,8 +161,9 @@ extern int nexthop_same_firsthop(struct nexthop *next1, struct nexthop *next2);
extern const char *nexthop2str(const struct nexthop *nexthop,
char *str, int size);
-extern struct nexthop *nexthop_next(struct nexthop *nexthop);
-extern struct nexthop *nexthop_next_active_resolved(struct nexthop *nexthop);
+extern struct nexthop *nexthop_next(const struct nexthop *nexthop);
+extern struct nexthop *
+nexthop_next_active_resolved(const struct nexthop *nexthop);
extern unsigned int nexthop_level(struct nexthop *nexthop);
/* Copies to an already allocated nexthop struct */
extern void nexthop_copy(struct nexthop *copy, const struct nexthop *nexthop,