From: Igor Putovny Date: Wed, 3 Jul 2024 14:04:44 +0000 (+0200) Subject: Change order of parameters in create_route() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fa044883535097e28d440823525979307ff9298;p=thirdparty%2Fbird.git Change order of parameters in create_route() --- diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 7801704c0..1d6067289 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -676,8 +676,11 @@ print_prefixes(const struct trie_node *node, int type) } } +/* + * Create route for aggregated prefix + */ static void -create_route_ip4(struct aggregator_proto *p, const struct net_addr_ip4 *addr, struct aggregator_bucket *bucket) +create_route_ip4(struct aggregator_proto *p, struct aggregator_bucket *bucket, const struct net_addr_ip4 *addr) { struct { struct network net; @@ -690,7 +693,7 @@ create_route_ip4(struct aggregator_proto *p, const struct net_addr_ip4 *addr, st } static void -create_route_ip6(struct aggregator_proto *p, struct net_addr_ip6 *addr, struct aggregator_bucket *bucket) +create_route_ip6(struct aggregator_proto *p, struct aggregator_bucket *bucket, const struct net_addr_ip6 *addr) { struct { struct network n; @@ -710,14 +713,14 @@ collect_prefixes_ip4_helper(struct aggregator_proto *p, struct net_addr_ip4 *add if (is_leaf(node)) { assert(node->bucket != NULL); - create_route_ip4(p, addr, node->bucket); + create_route_ip4(p, node->bucket, addr); *count += 1; return; } if (node->bucket) { - create_route_ip4(p, addr, node->bucket); + create_route_ip4(p, node->bucket, addr); *count += 1; } @@ -745,14 +748,14 @@ collect_prefixes_ip6_helper(struct aggregator_proto *p, struct net_addr_ip6 *add if (is_leaf(node)) { assert(node->bucket != NULL); - create_route_ip6(p, addr, node->bucket); + create_route_ip6(p, node->bucket, addr); *count += 1; return; } if (node->bucket) { - create_route_ip6(p, addr, node->bucket); + create_route_ip6(p, node->bucket, addr); *count += 1; }