diff options
author | 2007-09-07 16:15:48 +0000 | |
---|---|---|
committer | 2007-09-07 16:15:48 +0000 | |
commit | 4e32cb4154b77d25aa303303d8ac2bf97119dd7c (patch) | |
tree | bdf83b13611c2849df59fa1630f13a72d5777925 /sys/scsi/ses.c | |
parent | IPv6 is not an ARPA protocol; (diff) | |
download | wireguard-openbsd-4e32cb4154b77d25aa303303d8ac2bf97119dd7c.tar.xz wireguard-openbsd-4e32cb4154b77d25aa303303d8ac2bf97119dd7c.zip |
The obvious bzero/memset -> M_ZERO changes.
Diffstat (limited to 'sys/scsi/ses.c')
-rw-r--r-- | sys/scsi/ses.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/scsi/ses.c b/sys/scsi/ses.c index 1af264912fe..7871355e5dd 100644 --- a/sys/scsi/ses.c +++ b/sys/scsi/ses.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ses.c,v 1.45 2007/06/24 05:34:35 dlg Exp $ */ +/* $OpenBSD: ses.c,v 1.46 2007/09/07 16:15:49 krw Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -271,11 +271,10 @@ ses_read_config(struct ses_softc *sc) int i, ntypes = 0, nelems = 0; - buf = malloc(SES_BUFLEN, M_DEVBUF, M_NOWAIT); + buf = malloc(SES_BUFLEN, M_DEVBUF, M_NOWAIT | M_ZERO); if (buf == NULL) return (1); - memset(buf, 0, SES_BUFLEN); memset(&cmd, 0, sizeof(cmd)); cmd.opcode = RECEIVE_DIAGNOSTIC; cmd.flags |= SES_DIAG_PCV; @@ -428,11 +427,10 @@ ses_make_sensors(struct ses_softc *sc, struct ses_type_desc *types, int ntypes) #if NBIO > 0 case SES_T_DEVICE: slot = malloc(sizeof(struct ses_slot), - M_DEVBUF, M_NOWAIT); + M_DEVBUF, M_NOWAIT | M_ZERO); if (slot == NULL) goto error; - memset(slot, 0, sizeof(struct ses_slot)); slot->sl_stat = status; TAILQ_INSERT_TAIL(&sc->sc_slots, slot, @@ -461,11 +459,10 @@ ses_make_sensors(struct ses_softc *sc, struct ses_type_desc *types, int ntypes) } sensor = malloc(sizeof(struct ses_sensor), M_DEVBUF, - M_NOWAIT); + M_NOWAIT | M_ZERO); if (sensor == NULL) goto error; - memset(sensor, 0, sizeof(struct ses_sensor)); sensor->se_type = types[i].type; sensor->se_stat = status; sensor->se_sensor.type = stype; |