From d0a8512542c38acd383f36c2727baf1aa307ad91 Mon Sep 17 00:00:00 2001 From: greid Date: Thu, 21 Jun 2001 19:45:59 +0000 Subject: Use the M_ZERO flag to malloc(9) Reviewed by: cg MFC after: 1 week --- sys/dev/sound/pci/vibes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/dev/sound/pci/vibes.c') 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); -- cgit v1.1