summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2001-12-07 01:32:40 +0000
committerarr <arr@FreeBSD.org>2001-12-07 01:32:40 +0000
commitd502ffe4f059c1b176bdbdcd9fb6ffd2cb5e829c (patch)
treeb4bd5bb36c7b5e421a1e41990e032b699b76bf8c /sys
parentfc9cc438f0e444457f9e1c991ad7acdfea764209 (diff)
downloadFreeBSD-src-d502ffe4f059c1b176bdbdcd9fb6ffd2cb5e829c.zip
FreeBSD-src-d502ffe4f059c1b176bdbdcd9fb6ffd2cb5e829c.tar.gz
- malloc should be passed M_WAITOK, not M_WAIT (a mbuf flag)
- make use of M_ZERO to remove a call to bzero()
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_stf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c
index b3f80da..41b5a92 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;
OpenPOWER on IntegriCloud