summaryrefslogtreecommitdiff
path: root/sys/kern/tty_pty.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-09-07 15:00:21 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-09-07 15:00:21 +0000
commit85ce33f47337d8ae2200b69c865bad9704a53564 (patch)
tree45c03da13cdd18d57180b1614667ab28a7a26012 /sys/kern/tty_pty.c
parent27eb8946aec561bdd8abb9e09db43d6f4093d59a (diff)
Use M_ZERO in a few more places to shave bytes from the kernel.
eyeballed and ok dlg@
Diffstat (limited to 'sys/kern/tty_pty.c')
-rw-r--r--sys/kern/tty_pty.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index a49334d7951..a158a80b18a 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_pty.c,v 1.34 2007/05/29 00:17:32 thib Exp $ */
+/* $OpenBSD: tty_pty.c,v 1.35 2007/09/07 15:00:20 art Exp $ */
/* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */
/*
@@ -154,8 +154,8 @@ ptyarralloc(int nelem)
{
struct pt_softc **pt;
- pt = malloc(nelem * sizeof(struct pt_softc *), M_DEVBUF, M_WAITOK);
- bzero(pt, nelem * sizeof(struct pt_softc *));
+ pt = malloc(nelem * sizeof(struct pt_softc *), M_DEVBUF,
+ M_WAITOK|M_ZERO);
return pt;
}
@@ -199,9 +199,8 @@ check_pty(int minor)
* If the entry is not yet allocated, allocate one.
*/
if (!pt_softc[minor]) {
- MALLOC(pti, struct pt_softc *, sizeof(struct pt_softc),
- M_DEVBUF, M_WAITOK);
- bzero(pti, sizeof(struct pt_softc));
+ pti = malloc(sizeof(struct pt_softc), M_DEVBUF,
+ M_WAITOK|M_ZERO);
pti->pt_tty = ttymalloc();
ptydevname(minor, pti);
pt_softc[minor] = pti;