diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2000-12-08 21:51:06 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2000-12-08 21:51:06 +0000 |
commit | dd75d1d73b4f3034c1d9f621a49fff58b1d71eb1 (patch) | |
tree | 197ae73617ae75afe008897f6906b84835589ea2 /sys/i386/isa/bs | |
parent | ed5dbfbd3cd619638a7baac288f548aa1398edac (diff) | |
download | FreeBSD-src-dd75d1d73b4f3034c1d9f621a49fff58b1d71eb1.zip FreeBSD-src-dd75d1d73b4f3034c1d9f621a49fff58b1d71eb1.tar.gz |
Convert more malloc+bzero to malloc+M_ZERO.
Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Diffstat (limited to 'sys/i386/isa/bs')
-rw-r--r-- | sys/i386/isa/bs/bsfunc.c | 4 | ||||
-rw-r--r-- | sys/i386/isa/bs/bsif.c | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/sys/i386/isa/bs/bsfunc.c b/sys/i386/isa/bs/bsfunc.c index 42a636f..8800d3d 100644 --- a/sys/i386/isa/bs/bsfunc.c +++ b/sys/i386/isa/bs/bsfunc.c @@ -682,15 +682,13 @@ bs_init_target_info(bsc, target) { struct targ_info *ti; - ti = malloc(sizeof(struct targ_info), M_DEVBUF, M_NOWAIT); + ti = malloc(sizeof(struct targ_info), M_DEVBUF, M_NOWAIT | M_ZERO); if (ti == NULL) { bs_printf(NULL, "bs_init_targ_info", "no target info memory"); return ti; } - bzero(ti, sizeof(*ti)); - ti->ti_bsc = bsc; ti->ti_id = target; ti->sm_offset = 0; diff --git a/sys/i386/isa/bs/bsif.c b/sys/i386/isa/bs/bsif.c index 743fb39..d48469d 100644 --- a/sys/i386/isa/bs/bsif.c +++ b/sys/i386/isa/bs/bsif.c @@ -153,11 +153,11 @@ bsprobe(dev) printf("bs%d: memory already allocated\n", unit); return rv; } - if (!(bsc = malloc(sizeof(struct bs_softc), M_TEMP, M_NOWAIT))) { + if (!(bsc = malloc(sizeof(struct bs_softc), M_TEMP, M_NOWAIT | M_ZERO))) + { printf("bs%d cannot malloc!\n", unit); return rv; } - bzero(bsc, sizeof(struct bs_softc)); callout_handle_init(&bsc->timeout_ch); bscdata[unit] = bsc; bsc->unit = unit; |