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/rp.c | |
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/rp.c')
-rw-r--r-- | sys/i386/isa/rp.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/i386/isa/rp.c b/sys/i386/isa/rp.c index 7f5dd3a..21c30cc 100644 --- a/sys/i386/isa/rp.c +++ b/sys/i386/isa/rp.c @@ -1109,7 +1109,7 @@ rp_pciattach(pcici_t tag, int unit) rp_num_ports[unit] = num_ports; rp = (struct rp_port *) - malloc(sizeof(struct rp_port) * num_ports, M_TTYS, M_NOWAIT); + malloc(sizeof(struct rp_port) * num_ports, M_TTYS, M_NOWAIT|M_ZERO); if(rp == 0) { printf("rp_attach: Could not malloc rp_ports structures\n"); return; @@ -1119,14 +1119,12 @@ rp_pciattach(pcici_t tag, int unit) for(i=count;i < (count + rp_num_ports[unit]);i++) minor_to_unit[i] = unit; - bzero(rp, sizeof(struct rp_port) * num_ports); tty = (struct tty *) - malloc(sizeof(struct tty) * num_ports, M_TTYS, M_NOWAIT); + malloc(sizeof(struct tty) * num_ports, M_TTYS, M_NOWAIT|M_ZERO); if(tty == 0) { printf("rp_attach: Could not malloc tty structures\n"); return; } - bzero(tty, sizeof(struct tty) * num_ports); oldspl = spltty(); rp_addr(unit) = rp; @@ -1212,7 +1210,7 @@ struct isa_device *dev; rp_num_ports[unit] = num_ports; rp = (struct rp_port *) - malloc(sizeof(struct rp_port) * num_ports, M_TTYS, M_NOWAIT); + malloc(sizeof(struct rp_port) * num_ports, M_TTYS, M_NOWAIT|M_ZERO); if(rp == 0) { printf("rp_attach: Could not malloc rp_ports structures\n"); return(0); @@ -1222,14 +1220,12 @@ struct isa_device *dev; for(i=count;i < (count + rp_num_ports[unit]);i++) minor_to_unit[i] = unit; - bzero(rp, sizeof(struct rp_port) * num_ports); tty = (struct tty *) - malloc(sizeof(struct tty) * num_ports, M_TTYS, M_NOWAIT); + malloc(sizeof(struct tty) * num_ports, M_TTYS, M_NOWAIT|M_ZERO); if(tty == 0) { printf("rp_attach: Could not malloc tty structures\n"); return(0); } - bzero(tty, sizeof(struct tty) * num_ports); oldspl = spltty(); rp_addr(unit) = rp; |