From edb6ba6f84186d614fee5788011daba5eae7718d Mon Sep 17 00:00:00 2001 From: Igor Putovny Date: Fri, 20 Oct 2023 13:13:47 +0200 Subject: [PATCH] Rename constant --- proto/aggregator/aggregator.c | 8 ++++---- proto/aggregator/aggregator.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index a926cf27..08fa3370 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -271,7 +271,7 @@ aggregator_bucket_intersect(const struct trie_node *left, const struct trie_node while (i < left->potential_buckets_count && j < right->potential_buckets_count) { - if (node->potential_buckets_count >= MAX_POTENTIAL_NEXTHOP_COUNT) + if (node->potential_buckets_count >= MAX_POTENTIAL_BUCKETS_COUNT) return; int res = aggregator_bucket_compare(left->potential_buckets[i], right->potential_buckets[j]); @@ -304,7 +304,7 @@ aggregator_bucket_unionize(const struct trie_node *left, const struct trie_node while (i < left->potential_buckets_count && j < right->potential_buckets_count) { - if (node->potential_buckets_count >= MAX_POTENTIAL_NEXTHOP_COUNT) + if (node->potential_buckets_count >= MAX_POTENTIAL_BUCKETS_COUNT) return; int res = aggregator_bucket_compare(left->potential_buckets[i], right->potential_buckets[j]); @@ -344,7 +344,7 @@ aggregator_bucket_unionize(const struct trie_node *left, const struct trie_node while (i < left->potential_buckets_count) { - if (node->potential_buckets_count >= MAX_POTENTIAL_NEXTHOP_COUNT) + if (node->potential_buckets_count >= MAX_POTENTIAL_BUCKETS_COUNT) return; if (node->potential_buckets_count == 0 || node->potential_buckets[node->potential_buckets_count - 1] != left->potential_buckets[i]) @@ -355,7 +355,7 @@ aggregator_bucket_unionize(const struct trie_node *left, const struct trie_node while (j < right->potential_buckets_count) { - if (node->potential_buckets_count >= MAX_POTENTIAL_NEXTHOP_COUNT) + if (node->potential_buckets_count >= MAX_POTENTIAL_BUCKETS_COUNT) return; if (node->potential_buckets_count == 0 || node->potential_buckets[node->potential_buckets_count - 1] != right->potential_buckets[j]) diff --git a/proto/aggregator/aggregator.h b/proto/aggregator/aggregator.h index 17a6e8e2..2d0a6167 100644 --- a/proto/aggregator/aggregator.h +++ b/proto/aggregator/aggregator.h @@ -17,7 +17,7 @@ #include "nest/protocol.h" #include "lib/hash.h" -#define MAX_POTENTIAL_NEXTHOP_COUNT 16 +#define MAX_POTENTIAL_BUCKETS_COUNT 16 struct aggregator_config { struct proto_config c; @@ -93,7 +93,7 @@ struct trie_node { struct trie_node *parent; struct trie_node *child[2]; struct aggregator_bucket *bucket; - struct aggregator_bucket *potential_buckets[MAX_POTENTIAL_NEXTHOP_COUNT]; + struct aggregator_bucket *potential_buckets[MAX_POTENTIAL_BUCKETS_COUNT]; int potential_buckets_count; };