]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Modify agg_XX calls to use `const struct prefix`
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 22 Mar 2020 01:39:54 +0000 (21:39 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 22 Mar 2020 01:44:48 +0000 (21:44 -0400)
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>
lib/agg_table.h

index 40ffe8c7552873e4a0f17f0b9b943d2162e3ee88..f95fed6758f48a03a6a0aeb889506d1402f1ce47 100644 (file)
@@ -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));
 }