0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Rename constant

This commit is contained in:
Igor Putovny 2023-10-20 13:13:47 +02:00
parent 4bcf7ac37f
commit edb6ba6f84
2 changed files with 6 additions and 6 deletions

View File

@ -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])

View File

@ -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;
};