0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-17 16:48:43 +00:00

Converted some mb_alloc/bzero pairs to mb_allocz.

This commit is contained in:
Martin Mares 1999-03-04 11:40:05 +00:00
parent 8fe48f1377
commit f81dc8564a
2 changed files with 2 additions and 4 deletions

View File

@ -33,8 +33,7 @@ krt_temp_iface(struct krt_proto *p, char *name)
WALK_LIST(i, p->scan.temp_ifs) WALK_LIST(i, p->scan.temp_ifs)
if (!strcmp(i->name, name)) if (!strcmp(i->name, name))
return i; return i;
i = mb_alloc(p->p.pool, sizeof(struct iface)); i = mb_allocz(p->p.pool, sizeof(struct iface));
bzero(i, sizeof(*i));
strcpy(i->name, name); strcpy(i->name, name);
add_tail(&p->scan.temp_ifs, &i->n); add_tail(&p->scan.temp_ifs, &i->n);
return i; return i;

View File

@ -419,8 +419,7 @@ krt_temp_iface(struct krt_proto *p, unsigned index)
WALK_LIST(i, p->scan.temp_ifs) WALK_LIST(i, p->scan.temp_ifs)
if (i->index == index) if (i->index == index)
return i; return i;
i = mb_alloc(p->p.pool, sizeof(struct iface)); i = mb_allocz(p->p.pool, sizeof(struct iface));
bzero(i, sizeof(*i));
if (j = if_find_by_index(index)) if (j = if_find_by_index(index))
strcpy(i->name, j->name); strcpy(i->name, j->name);
else else