summaryrefslogtreecommitdiffstats
path: root/sys/net/if_loop.c
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2007-09-15 16:43:51 +0000
committerhenning <henning@openbsd.org>2007-09-15 16:43:51 +0000
commit8b28ab37428ee58f6600bcf87929b4881d6f1782 (patch)
tree278c3461c0063744c0dcb94d39c8865de9cd34f4 /sys/net/if_loop.c
parentGive hardware physical addresses and add some missing (diff)
downloadwireguard-openbsd-8b28ab37428ee58f6600bcf87929b4881d6f1782.tar.xz
wireguard-openbsd-8b28ab37428ee58f6600bcf87929b4881d6f1782.zip
malloc sweep:
-remove useless casts -MALLOC/FREE -> malloc/free -use M_ZERO where appropriate instead of seperate bzero feedback & ok krw, hshoexer
Diffstat (limited to 'sys/net/if_loop.c')
-rw-r--r--sys/net/if_loop.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 3485bc75b2d..eb7169144ad 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_loop.c,v 1.41 2007/06/06 10:04:36 henning Exp $ */
+/* $OpenBSD: if_loop.c,v 1.42 2007/09/15 16:43:51 henning Exp $ */
/* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */
/*
@@ -180,10 +180,9 @@ loop_clone_create(ifc, unit)
{
struct ifnet *ifp;
- MALLOC(ifp, struct ifnet *, sizeof(*ifp), M_DEVBUF, M_NOWAIT);
+ ifp = malloc(sizeof(*ifp), M_DEVBUF, M_NOWAIT|M_ZERO);
if (ifp == NULL)
return (ENOMEM);
- bzero(ifp, sizeof(struct ifnet));
snprintf(ifp->if_xname, sizeof ifp->if_xname, "lo%d", unit);
ifp->if_softc = NULL;