diff options
| author | 2007-09-15 16:43:51 +0000 | |
|---|---|---|
| committer | 2007-09-15 16:43:51 +0000 | |
| commit | 8b28ab37428ee58f6600bcf87929b4881d6f1782 (patch) | |
| tree | 278c3461c0063744c0dcb94d39c8865de9cd34f4 /sys/net/if_loop.c | |
| parent | Give hardware physical addresses and add some missing (diff) | |
| download | wireguard-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.c | 5 |
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; |
