diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-01 15:34:49 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-01 15:34:49 +0000 |
commit | a730dedabc875f93e81898068b1cccdb9e45cb7c (patch) | |
tree | 059cc27503e1389b0da52a36e3fd0e692e1f24e2 /sys/dev/sdmmc | |
parent | d75aaeaf6b0231dbe849cd06ddac7f63b1e30bcc (diff) |
More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...' where
obvious.
Diffstat (limited to 'sys/dev/sdmmc')
-rw-r--r-- | sys/dev/sdmmc/sdhc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c index 78ebdf4009e..23cfe6d6954 100644 --- a/sys/dev/sdmmc/sdhc.c +++ b/sys/dev/sdmmc/sdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhc.c,v 1.23 2007/09/10 19:49:31 gilles Exp $ */ +/* $OpenBSD: sdhc.c,v 1.24 2007/10/01 15:34:48 krw Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -155,12 +155,10 @@ sdhc_host_found(struct sdhc_softc *sc, bus_space_tag_t iot, /* Allocate one more host structure. */ sc->sc_nhosts++; - hp = (struct sdhc_host *)malloc(sizeof(struct sdhc_host), - M_DEVBUF, M_WAITOK); + hp = malloc(sizeof(*hp), M_DEVBUF, M_WAITOK | M_ZERO); sc->sc_host[sc->sc_nhosts - 1] = hp; /* Fill in the new host structure. */ - bzero(hp, sizeof(struct sdhc_host)); hp->sc = sc; hp->iot = iot; hp->ioh = ioh; |