diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-01 04:03:52 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-01 04:03:52 +0000 |
commit | e616cdcc0f1277f5f457c6d8f80bd54ac6da242d (patch) | |
tree | 5e9bce6ae1a86031ec60eb724a9c31cca82e8dd4 /sys/dev/ic/cac.c | |
parent | 449a45ec6bc0733c5f8c4a7eaab63071e4eb8d27 (diff) |
More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...'.
Diffstat (limited to 'sys/dev/ic/cac.c')
-rw-r--r-- | sys/dev/ic/cac.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c index 665e22ceeb8..8082117d466 100644 --- a/sys/dev/ic/cac.c +++ b/sys/dev/ic/cac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cac.c,v 1.23 2006/11/28 23:59:45 dlg Exp $ */ +/* $OpenBSD: cac.c,v 1.24 2007/10/01 04:03:51 krw Exp $ */ /* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */ /* @@ -225,13 +225,12 @@ cac_init(struct cac_softc *sc, int startfw) sc->sc_nunits = cinfo.num_drvs; sc->sc_dinfos = malloc(cinfo.num_drvs * sizeof(struct cac_drive_info), - M_DEVBUF, M_NOWAIT); + M_DEVBUF, M_NOWAIT | M_ZERO); if (sc->sc_dinfos == NULL) { printf("%s: cannot allocate memory for drive_info\n", sc->sc_dv.dv_xname); return (-1); } - bzero(sc->sc_dinfos, cinfo.num_drvs * sizeof(struct cac_drive_info)); sc->sc_link.adapter_softc = sc; sc->sc_link.adapter = &cac_switch; |