0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Small changes

This commit is contained in:
Igor Putovny 2024-06-27 17:14:01 +02:00
parent 1a33e79f22
commit 8a019b490e

View File

@ -79,10 +79,11 @@ is_leaf(const struct trie_node *node)
/*
* Allocate new node in protocol linpool
*/
static struct trie_node *
static inline struct trie_node *
create_new_node(linpool *trie_pool)
{
return lp_allocz(trie_pool, sizeof(struct trie_node));
struct trie_node *node = lp_allocz(trie_pool, sizeof(*node));
return node;
}
/*
@ -1602,13 +1603,13 @@ trie_init(struct aggregator_proto *p)
if (p->addr_type == NET_IP4)
{
default_net = mb_allocz(p->p.pool, sizeof(struct network) + sizeof(struct net_addr_ip4));
default_net = mb_allocz(p->p.pool, sizeof(*default_net) + sizeof(struct net_addr_ip4));
net_fill_ip4(default_net->n.addr, IP4_NONE, 0);
log("Creating net %p for default route %N", default_net, default_net->n.addr);
}
else if (p->addr_type == NET_IP6)
{
default_net = mb_allocz(p->p.pool, sizeof(struct network) + sizeof(struct net_addr_ip6));
default_net = mb_allocz(p->p.pool, sizeof(*default_net) + sizeof(struct net_addr_ip6));
net_fill_ip6(default_net->n.addr, IP6_NONE, 0);
log("Creating net %p for default route %N", default_net, default_net->n.addr);
}