From d502ffe4f059c1b176bdbdcd9fb6ffd2cb5e829c Mon Sep 17 00:00:00 2001 From: arr Date: Fri, 7 Dec 2001 01:32:40 +0000 Subject: [PATCH] - malloc should be passed M_WAITOK, not M_WAIT (a mbuf flag) - make use of M_ZERO to remove a call to bzero() --- sys/net/if_stf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index b3f80da1020d..41b5a92c5e22 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -192,9 +192,7 @@ stf_clone_create(ifc, unit) return (EEXIST); } - sc = malloc(sizeof(struct stf_softc), M_STF, M_WAIT); - bzero(sc, sizeof(struct stf_softc)); - + sc = malloc(sizeof(struct stf_softc), M_STF, M_WAITOK | M_ZERO); sc->sc_if.if_name = STFNAME; sc->sc_if.if_unit = *unit; sc->r_unit = r; @@ -208,7 +206,6 @@ stf_clone_create(ifc, unit) } sc->sc_if.if_mtu = IPV6_MMTU; - sc->sc_if.if_flags = 0; sc->sc_if.if_ioctl = stf_ioctl; sc->sc_if.if_output = stf_output; sc->sc_if.if_type = IFT_STF;