mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
CLang compilation fix
This commit is contained in:
parent
ec5d9d49ab
commit
84c8f24241
@ -3354,17 +3354,18 @@ ea_set_hostentry(ea_list **to, rtable *dep, rtable *src, ip_addr gw, ip_addr ll,
|
|||||||
{
|
{
|
||||||
struct {
|
struct {
|
||||||
struct hostentry_adata head;
|
struct hostentry_adata head;
|
||||||
u32 label_space[lnum];
|
u32 label_space[];
|
||||||
} h;
|
} *h;
|
||||||
|
u32 sz = sizeof *h + lnum * sizeof(u32);
|
||||||
memset(&h, 0, sizeof h);
|
h = alloca(sz);
|
||||||
|
memset(h, 0, sz);
|
||||||
|
|
||||||
RT_LOCKED(src, tab)
|
RT_LOCKED(src, tab)
|
||||||
h.head.he = rt_get_hostentry(tab, gw, ll, dep);
|
h->head.he = rt_get_hostentry(tab, gw, ll, dep);
|
||||||
|
|
||||||
memcpy(h.head.labels, labels, lnum * sizeof(u32));
|
memcpy(h->head.labels, labels, lnum * sizeof(u32));
|
||||||
|
|
||||||
ea_set_attr_data(to, &ea_gen_hostentry, 0, h.head.ad.data, (byte *) &h.head.labels[lnum] - h.head.ad.data);
|
ea_set_attr_data(to, &ea_gen_hostentry, 0, h->head.ad.data, (byte *) &h->head.labels[lnum] - h->head.ad.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user