]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Move code around
authorIgor Putovny <igor.putovny@nic.cz>
Thu, 23 Jan 2025 16:12:01 +0000 (17:12 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Thu, 23 Jan 2025 16:12:50 +0000 (17:12 +0100)
proto/aggregator/aggregator.c

index a0428f4619fdb53505bc3698c9db69e5bfd4ce28..7c8b17e646c60ddb1c5fc7e1e0b05a07e3b9a8b6 100644 (file)
@@ -157,6 +157,19 @@ node_insert_potential_bucket(struct trie_node *node, const struct aggregator_buc
   node->potential_buckets_count++;
 }
 
+/*
+ * Check if @bucket is one of potential buckets in @node
+ */
+static int
+is_bucket_potential(const struct trie_node *node, const struct aggregator_bucket *bucket)
+{
+  assert(node != NULL);
+  assert(bucket != NULL);
+
+  ASSERT_DIE(bucket->id < MAX_POTENTIAL_BUCKETS_COUNT);
+  return BIT32R_TEST(node->potential_buckets, bucket->id);
+}
+
 /*
  * Return pointer to bucket with ID @id.
  * Protocol contains list of pointers to all buckets. Every pointer
@@ -595,27 +608,6 @@ second_pass(struct trie_node *node)
   assert(node->selected_bucket == NULL);
 }
 
-/*
- * Check if @bucket is one of potential buckets in @node
- */
-static int
-is_bucket_potential(const struct trie_node *node, const struct aggregator_bucket *bucket)
-{
-  assert(node != NULL);
-  assert(bucket != NULL);
-
-  ASSERT_DIE(bucket->id < MAX_POTENTIAL_BUCKETS_COUNT);
-  return BIT32R_TEST(node->potential_buckets, bucket->id);
-}
-
-static void
-remove_potential_buckets(struct trie_node *node)
-{
-  assert(node != NULL);
-  node->potential_buckets_count = 0;
-  memset(node->potential_buckets, 0, sizeof(node->potential_buckets));
-}
-
 static void
 third_pass_helper(struct aggregator_proto *p, struct trie_node *node)
 {