From c542107b8900003180e1dabb13c64a7ddcf1aed0 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Fri, 28 Dec 2007 11:37:08 +0000 Subject: [PATCH] - Use M_ZERO - Minor cleanup --- sys/netinet/in.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 4e6157df1f..e2c360d5df 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -32,7 +32,7 @@ * * @(#)in.c 8.4 (Berkeley) 1/9/95 * $FreeBSD: src/sys/netinet/in.c,v 1.44.2.14 2002/11/08 00:45:50 suz Exp $ - * $DragonFly: src/sys/netinet/in.c,v 1.21 2007/11/16 05:07:36 sephe Exp $ + * $DragonFly: src/sys/netinet/in.c,v 1.22 2007/12/28 11:37:08 sephe Exp $ */ #include "opt_bootp.h" @@ -266,11 +266,9 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, if (ifp == 0) return (EADDRNOTAVAIL); if (ia == (struct in_ifaddr *)0) { - ia = (struct in_ifaddr *) - kmalloc(sizeof *ia, M_IFADDR, M_WAITOK); - if (ia == (struct in_ifaddr *)NULL) + ia = kmalloc(sizeof *ia, M_IFADDR, M_WAITOK | M_ZERO); + if (ia == NULL) return (ENOBUFS); - bzero(ia, sizeof *ia); /* * Protect from NETISR_IP traversing address list * while we're modifying it. -- 2.41.0