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:
parent
4bcf7ac37f
commit
edb6ba6f84
@ -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)
|
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;
|
return;
|
||||||
|
|
||||||
int res = aggregator_bucket_compare(left->potential_buckets[i], right->potential_buckets[j]);
|
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)
|
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;
|
return;
|
||||||
|
|
||||||
int res = aggregator_bucket_compare(left->potential_buckets[i], right->potential_buckets[j]);
|
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)
|
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;
|
return;
|
||||||
|
|
||||||
if (node->potential_buckets_count == 0 || node->potential_buckets[node->potential_buckets_count - 1] != left->potential_buckets[i])
|
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)
|
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;
|
return;
|
||||||
|
|
||||||
if (node->potential_buckets_count == 0 || node->potential_buckets[node->potential_buckets_count - 1] != right->potential_buckets[j])
|
if (node->potential_buckets_count == 0 || node->potential_buckets[node->potential_buckets_count - 1] != right->potential_buckets[j])
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "nest/protocol.h"
|
#include "nest/protocol.h"
|
||||||
#include "lib/hash.h"
|
#include "lib/hash.h"
|
||||||
|
|
||||||
#define MAX_POTENTIAL_NEXTHOP_COUNT 16
|
#define MAX_POTENTIAL_BUCKETS_COUNT 16
|
||||||
|
|
||||||
struct aggregator_config {
|
struct aggregator_config {
|
||||||
struct proto_config c;
|
struct proto_config c;
|
||||||
@ -93,7 +93,7 @@ struct trie_node {
|
|||||||
struct trie_node *parent;
|
struct trie_node *parent;
|
||||||
struct trie_node *child[2];
|
struct trie_node *child[2];
|
||||||
struct aggregator_bucket *bucket;
|
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;
|
int potential_buckets_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user