summaryrefslogtreecommitdiff
path: root/lib/agg_table.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-03-21 21:39:54 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2020-03-21 21:44:48 -0400
commit8150a500bcc2392ed0d71c35902ce2fa268ac2f1 (patch)
tree0263e06de72a3bce2b3210ef2903dab43eea3026 /lib/agg_table.h
parent3f1ba9b83627689afed6a073502af4c67c3e581a (diff)
lib: Modify agg_XX calls to use `const struct prefix`
Tell the compiler that the prefix is being used for lookups and it will never change. Setup for future work. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/agg_table.h')
-rw-r--r--lib/agg_table.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/agg_table.h b/lib/agg_table.h
index 40ffe8c755..f95fed6758 100644
--- a/lib/agg_table.h
+++ b/lib/agg_table.h
@@ -86,13 +86,13 @@ static inline struct agg_node *agg_route_next(struct agg_node *node)
}
static inline struct agg_node *agg_node_get(struct agg_table *table,
- struct prefix *p)
+ const struct prefix *p)
{
return agg_node_from_rnode(route_node_get(table->route_table, p));
}
static inline struct agg_node *
-agg_node_lookup(const struct agg_table *const table, struct prefix *p)
+agg_node_lookup(const struct agg_table *const table, const struct prefix *p)
{
return agg_node_from_rnode(route_node_lookup(table->route_table, p));
}
@@ -109,7 +109,7 @@ static inline struct agg_node *agg_route_next_until(struct agg_node *node,
}
static inline struct agg_node *agg_node_match(struct agg_table *table,
- struct prefix *p)
+ const struct prefix *p)
{
return agg_node_from_rnode(route_node_match(table->route_table, p));
}