summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_subr.c
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2000-09-27 16:13:46 +0000
committermickey <mickey@openbsd.org>2000-09-27 16:13:46 +0000
commit8b34068e3e730441ed86d2ec9a829c83b96323e0 (patch)
tree03808780c08fc54ab40551a5b64804b25164e66a /sys/kern/tty_subr.c
parentMinimal optimization. (diff)
downloadwireguard-openbsd-8b34068e3e730441ed86d2ec9a829c83b96323e0.tar.xz
wireguard-openbsd-8b34068e3e730441ed86d2ec9a829c83b96323e0.zip
replace MALLOC/FREE w/ malloc/free for non-constant-sized memory allocations; art@ ok
Diffstat (limited to 'sys/kern/tty_subr.c')
-rw-r--r--sys/kern/tty_subr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c
index 2bb0490c46f..e5ce35f924a 100644
--- a/sys/kern/tty_subr.c
+++ b/sys/kern/tty_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_subr.c,v 1.8 2000/08/04 16:39:47 deraadt Exp $ */
+/* $OpenBSD: tty_subr.c,v 1.9 2000/09/27 16:13:46 mickey Exp $ */
/* $NetBSD: tty_subr.c,v 1.13 1996/02/09 19:00:43 christos Exp $ */
/*
@@ -93,15 +93,15 @@ clalloc(clp, size, quot)
int quot;
{
- MALLOC(clp->c_cs, u_char *, size, M_TTYS, M_WAITOK);
+ clp->c_cs = malloc(size, M_TTYS, M_WAITOK);
if (!clp->c_cs)
return (-1);
bzero(clp->c_cs, size);
if (quot) {
- MALLOC(clp->c_cq, u_char *, QMEM(size), M_TTYS, M_WAITOK);
+ clp->c_cq = malloc(QMEM(size), M_TTYS, M_WAITOK);
if (!clp->c_cq) {
- FREE(clp->c_cs, M_TTYS);
+ free(clp->c_cs, M_TTYS);
clp->c_cs = NULL;
return (-1);
}
@@ -122,11 +122,11 @@ clfree(clp)
{
if (clp->c_cs) {
bzero(clp->c_cs, clp->c_cn);
- FREE(clp->c_cs, M_TTYS);
+ free(clp->c_cs, M_TTYS);
}
if (clp->c_cq) {
bzero(clp->c_cq, QMEM(clp->c_cn));
- FREE(clp->c_cq, M_TTYS);
+ free(clp->c_cq, M_TTYS);
}
clp->c_cs = clp->c_cq = (u_char *)0;
}