From 49ee481280294c274915d4187fcab1b48b144aa1 Mon Sep 17 00:00:00 2001 From: Igor Putovny Date: Tue, 5 Dec 2023 14:25:08 +0100 Subject: [PATCH] Make pointer to aggregator bucket const --- proto/aggregator/aggregator.c | 2 +- proto/aggregator/aggregator.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index f81f5f24..deeec401 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -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 */ diff --git a/proto/aggregator/aggregator.h b/proto/aggregator/aggregator.h index 22638ac2..79a91ed9 100644 --- a/proto/aggregator/aggregator.h +++ b/proto/aggregator/aggregator.h @@ -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; };