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/dev/si | |
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/dev/si')
-rw-r--r-- | sys/dev/si/si.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 28e6a42..cc61a17 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -497,23 +497,22 @@ try_next: (maddr + (unsigned)(modp->sm_next & 0x7fff)); } sc->sc_ports = (struct si_port *)malloc(sizeof(struct si_port) * nport, - M_DEVBUF, M_NOWAIT); + M_DEVBUF, M_NOWAIT | M_ZERO); if (sc->sc_ports == 0) { mem_fail: printf("si%d: fail to malloc memory for port structs\n", unit); return EINVAL; } - bzero(sc->sc_ports, sizeof(struct si_port) * nport); sc->sc_nport = nport; /* * allocate tty structures for ports */ - tp = (struct tty *)malloc(sizeof(*tp) * nport, M_DEVBUF, M_NOWAIT); + tp = (struct tty *)malloc(sizeof(*tp) * nport, M_DEVBUF, + M_NOWAIT | M_ZERO); if (tp == 0) goto mem_fail; - bzero(tp, sizeof(*tp) * nport); si__tty = tp; /* |