diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2000-11-18 15:21:22 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2000-11-18 15:21:22 +0000 |
commit | 51c82207610826a4ad7bf626560db6021584440d (patch) | |
tree | 8da5c68a92019b9e37869775fe3a8353617ec207 /sys/dev/mly | |
parent | 918549eb3151450239d659ae968cb9e68b863bfc (diff) | |
download | FreeBSD-src-51c82207610826a4ad7bf626560db6021584440d.zip FreeBSD-src-51c82207610826a4ad7bf626560db6021584440d.tar.gz |
Further use of M_ZERO.
Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Approved by: msmith
Diffstat (limited to 'sys/dev/mly')
-rw-r--r-- | sys/dev/mly/mly.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c index 91cec9c..71ad591 100644 --- a/sys/dev/mly/mly.c +++ b/sys/dev/mly/mly.c @@ -296,11 +296,10 @@ mly_rescan_btl(struct mly_softc *sc, int bus, int target) return; /* we'll be retried soon */ /* set up the data buffer */ - if ((mc->mc_data = malloc(sizeof(union mly_devinfo), M_DEVBUF, M_NOWAIT)) == NULL) { + if ((mc->mc_data = malloc(sizeof(union mly_devinfo), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) { mly_release_command(mc); return; /* we'll get retried the next time a command completes */ } - bzero(mc->mc_data, sizeof(union mly_devinfo)); mc->mc_flags |= MLY_CMD_DATAIN; mc->mc_complete = mly_complete_rescan; @@ -589,11 +588,10 @@ mly_fetch_event(struct mly_softc *sc) return; /* we'll get retried the next time a command completes */ /* set up the data buffer */ - if ((mc->mc_data = malloc(sizeof(struct mly_event), M_DEVBUF, M_NOWAIT)) == NULL) { + if ((mc->mc_data = malloc(sizeof(struct mly_event), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) { mly_release_command(mc); return; /* we'll get retried the next time a command completes */ } - bzero(mc->mc_data, sizeof(struct mly_event)); mc->mc_length = sizeof(struct mly_event); mc->mc_flags |= MLY_CMD_DATAIN; mc->mc_complete = mly_complete_event; |