diff options
author | greid <greid@FreeBSD.org> | 2001-06-21 19:45:59 +0000 |
---|---|---|
committer | greid <greid@FreeBSD.org> | 2001-06-21 19:45:59 +0000 |
commit | d0a8512542c38acd383f36c2727baf1aa307ad91 (patch) | |
tree | 08fa50df9ce5a5907be157ee121c5a334e8dd027 /sys/dev/sound/pci/vibes.c | |
parent | a0eb3fcc17fbcf0a486ed584e0b45f087f602c57 (diff) | |
download | FreeBSD-src-d0a8512542c38acd383f36c2727baf1aa307ad91.zip FreeBSD-src-d0a8512542c38acd383f36c2727baf1aa307ad91.tar.gz |
Use the M_ZERO flag to malloc(9)
Reviewed by: cg
MFC after: 1 week
Diffstat (limited to 'sys/dev/sound/pci/vibes.c')
-rw-r--r-- | sys/dev/sound/pci/vibes.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index 41a8c58..add787f 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -714,12 +714,11 @@ sv_attach(device_t dev) { d = device_get_softc(dev); - sc = malloc(sizeof(struct sc_info), M_DEVBUF, M_NOWAIT); + sc = malloc(sizeof(struct sc_info), M_DEVBUF, M_NOWAIT | M_ZERO); if (sc == NULL) { device_printf(dev, "cannot allocate softc"); return ENXIO; } - bzero(sc, sizeof(sc)); sc->dev = dev; data = pci_read_config(dev, PCIR_COMMAND, 2); |