]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Make pointer to aggregator bucket const
authorIgor Putovny <igor.putovny@nic.cz>
Tue, 5 Dec 2023 13:25:08 +0000 (14:25 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Thu, 30 May 2024 10:30:00 +0000 (12:30 +0200)
proto/aggregator/aggregator.c
proto/aggregator/aggregator.h

index f81f5f24da016f0b58a670db0454ba14f24ac570..deeec4012da4175649c8bf7895294b1ef06bce9d 100644 (file)
@@ -164,7 +164,7 @@ trie_insert_prefix(const union net_addr_union *addr, struct trie_node * const ro
 /*
  * Return first non-null bucket of the closest ancestor of @node
  */
-static struct aggregator_bucket *
+static const struct aggregator_bucket *
 get_ancestor_bucket(const struct trie_node *node)
 {
   /* Defined for other than root nodes */
index 22638ac210ec0f68c4b93d52e61d71ea0e517114..79a91ed9f8cb6b13ef2ffa39f4ea8718068780c0 100644 (file)
@@ -94,8 +94,8 @@ struct aggr_item_node {
 struct trie_node {
   struct trie_node *parent;
   struct trie_node *child[2];
-  struct aggregator_bucket *bucket;
-  struct aggregator_bucket *potential_buckets[MAX_POTENTIAL_BUCKETS_COUNT];
+  const struct aggregator_bucket *bucket;
+  const struct aggregator_bucket *potential_buckets[MAX_POTENTIAL_BUCKETS_COUNT];
   int potential_buckets_count;
 };