summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-09 23:03:31 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-09 23:03:31 +0000
commit7281d1983cc6a5aed10c87473686b240abdd6076 (patch)
treebebba9d5959b74f2a849c63d343ec9d6e707972d /sys/dev
parent0215be619ffd3d3427a6e8c39aa07aac02380cdf (diff)
malloc+memset(,0,) -> malloc+M_ZERO. 'Fixes' not zeroing of all
allocated memory, as I can't see an obvious initialization of the memory elsewhere. NetBSD uses M_ZERO here.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/umass_scsi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c
index 2c0aa077089..a79e55f7fd6 100644
--- a/sys/dev/usb/umass_scsi.c
+++ b/sys/dev/usb/umass_scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass_scsi.c,v 1.18 2007/06/13 10:33:52 mbalmer Exp $ */
+/* $OpenBSD: umass_scsi.c,v 1.19 2007/10/09 23:03:30 krw Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -155,9 +155,7 @@ umass_scsi_setup(struct umass_softc *sc)
{
struct umass_scsi_softc *scbus;
- scbus = malloc(sizeof(struct umass_scsi_softc), M_DEVBUF, M_WAITOK);
- memset(&scbus->sc_link, 0, sizeof(struct scsi_link));
- memset(&scbus->sc_adapter, 0, sizeof(struct scsi_adapter));
+ scbus = malloc(sizeof(*scbus), M_DEVBUF, M_WAITOK | M_ZERO);
sc->bus = (struct umassbus_softc *)scbus;