From: Martin Mares Date: Thu, 4 Mar 1999 11:40:05 +0000 (+0000) Subject: Converted some mb_alloc/bzero pairs to mb_allocz. X-Git-Tag: v1.2.0~1671 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f81dc8564ae6c17638d7e3970b9980d0d00fc78a;p=thirdparty%2Fbird.git Converted some mb_alloc/bzero pairs to mb_allocz. --- diff --git a/sysdep/linux/krt-scan.c b/sysdep/linux/krt-scan.c index 3e5a24018..4660682d7 100644 --- a/sysdep/linux/krt-scan.c +++ b/sysdep/linux/krt-scan.c @@ -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; diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c index c196efba9..539686e0e 100644 --- a/sysdep/linux/netlink/netlink.c +++ b/sysdep/linux/netlink/netlink.c @@ -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