]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Converted some mb_alloc/bzero pairs to mb_allocz.
authorMartin Mares <mj@ucw.cz>
Thu, 4 Mar 1999 11:40:05 +0000 (11:40 +0000)
committerMartin Mares <mj@ucw.cz>
Thu, 4 Mar 1999 11:40:05 +0000 (11:40 +0000)
sysdep/linux/krt-scan.c
sysdep/linux/netlink/netlink.c

index 3e5a240180a234bddc4af2200bc04ac8056ff8b2..4660682d72d7dfe804fe8dd85849b3785d47059a 100644 (file)
@@ -33,8 +33,7 @@ krt_temp_iface(struct krt_proto *p, char *name)
   WALK_LIST(i, p->scan.temp_ifs)
     if (!strcmp(i->name, name))
       return i;
-  i = mb_alloc(p->p.pool, sizeof(struct iface));
-  bzero(i, sizeof(*i));
+  i = mb_allocz(p->p.pool, sizeof(struct iface));
   strcpy(i->name, name);
   add_tail(&p->scan.temp_ifs, &i->n);
   return i;
index c196efba9601c2306c8b56703a1f4218c2c79cb3..539686e0e80098a2e040e6aea357307a2afa5583 100644 (file)
@@ -419,8 +419,7 @@ krt_temp_iface(struct krt_proto *p, unsigned index)
   WALK_LIST(i, p->scan.temp_ifs)
     if (i->index == index)
       return i;
-  i = mb_alloc(p->p.pool, sizeof(struct iface));
-  bzero(i, sizeof(*i));
+  i = mb_allocz(p->p.pool, sizeof(struct iface));
   if (j = if_find_by_index(index))
     strcpy(i->name, j->name);
   else