diff options
| author | Mark Stapp <mjs@voltanet.io> | 2018-07-12 16:05:19 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2018-07-23 10:34:35 -0400 |
| commit | 123214efb82f6348cd80c387be15a1e2e21ce63e (patch) | |
| tree | 9120c8e331acfb05b30eed616f34967fae8b30c0 /lib/plist.c | |
| parent | c4aee4fe3133127f16d3967e74e52b262438d57f (diff) | |
libs, daemons: use const in route-map apply
Use 'const prefix *' in route-map apply apis; led to some
corresponding changes in several daemons.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/plist.c')
| -rw-r--r-- | lib/plist.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/plist.c b/lib/plist.c index 056b737f54..2b666f256f 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -656,7 +656,7 @@ static const char *prefix_list_type_str(struct prefix_list_entry *pentry) } static int prefix_list_entry_match(struct prefix_list_entry *pentry, - struct prefix *p) + const struct prefix *p) { int ret; @@ -683,14 +683,15 @@ static int prefix_list_entry_match(struct prefix_list_entry *pentry, return 1; } -enum prefix_list_type prefix_list_apply_which_prefix(struct prefix_list *plist, - struct prefix **which, - void *object) +enum prefix_list_type prefix_list_apply_which_prefix( + struct prefix_list *plist, + const struct prefix **which, + const void *object) { struct prefix_list_entry *pentry, *pbest = NULL; - struct prefix *p = (struct prefix *)object; - uint8_t *byte = p->u.val; + const struct prefix *p = (const struct prefix *)object; + const uint8_t *byte = p->u.val; size_t depth; size_t validbits = p->prefixlen; struct pltrie_table *table; |
