summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2007-10-29 14:12:20 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2007-10-29 14:12:20 +0000
commita64044a80eb86e06b8f65c814a31d3a7cfb51d9e (patch)
tree9ff10d249e25537d8045318f815afc94fbc64692 /sys
parentee3b88adadcccdd4cddcc0c4d52e5ce2fd3a8833 (diff)
MALLOC/FREE -> malloc/free
replace an hard coded value with M_WAITOK ok krw@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/exec_script.c6
-rw-r--r--sys/kern/kern_descrip.c6
-rw-r--r--sys/kern/kern_event.c6
-rw-r--r--sys/kern/kern_exec.c8
-rw-r--r--sys/kern/kern_lkm.c4
-rw-r--r--sys/kern/tty.c4
-rw-r--r--sys/kern/vfs_subr.c8
7 files changed, 21 insertions, 21 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c
index 791fc3f5ab9..b48dd20f337 100644
--- a/sys/kern/exec_script.c
+++ b/sys/kern/exec_script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_script.c,v 1.24 2006/11/14 18:00:27 jmc Exp $ */
+/* $OpenBSD: exec_script.c,v 1.25 2007/10/29 14:12:19 chl Exp $ */
/* $NetBSD: exec_script.c,v 1.13 1996/02/04 02:15:06 christos Exp $ */
/*
@@ -205,7 +205,7 @@ check_shell:
epp->ep_flags |= EXEC_INDIR;
/* and set up the fake args list, for later */
- MALLOC(shellargp, char **, 4 * sizeof(char *), M_EXEC, M_WAITOK);
+ shellargp = malloc(4 * sizeof(char *), M_EXEC, M_WAITOK);
tmpsap = shellargp;
*tmpsap = malloc(shellnamelen + 1, M_EXEC, M_WAITOK);
strlcpy(*tmpsap++, shellname, shellnamelen + 1);
@@ -309,7 +309,7 @@ fail:
free(*tmpsap, M_EXEC);
tmpsap++;
}
- FREE(shellargp, M_EXEC);
+ free(shellargp, M_EXEC);
}
/*
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index d2946c2edc4..3e807cf7cd1 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.76 2007/03/15 10:22:30 art Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.77 2007/10/29 14:12:19 chl Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -998,9 +998,9 @@ fdfree(struct proc *p)
if (fdp->fd_rdir)
vrele(fdp->fd_rdir);
if (fdp->fd_knlist)
- FREE(fdp->fd_knlist, M_TEMP);
+ free(fdp->fd_knlist, M_TEMP);
if (fdp->fd_knhash)
- FREE(fdp->fd_knhash, M_TEMP);
+ free(fdp->fd_knhash, M_TEMP);
pool_put(&fdesc_pool, fdp);
}
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index 39decd34450..f1a48a6b200 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_event.c,v 1.31 2007/05/30 02:24:59 tedu Exp $ */
+/* $OpenBSD: kern_event.c,v 1.32 2007/10/29 14:12:19 chl Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
@@ -332,7 +332,7 @@ filt_timerattach(struct knote *kn)
tticks = tvtohz(&tv);
kn->kn_flags |= EV_CLEAR; /* automatically set */
- MALLOC(to, struct timeout *, sizeof(*to), M_KEVENT, 0);
+ to = malloc(sizeof(*to), M_KEVENT, M_WAITOK);
timeout_set(to, filt_timerexpire, kn);
timeout_add(to, tticks);
kn->kn_hook = to;
@@ -347,7 +347,7 @@ filt_timerdetach(struct knote *kn)
to = (struct timeout *)kn->kn_hook;
timeout_del(to);
- FREE(to, M_KEVENT);
+ free(to, M_KEVENT);
kq_ntimeouts--;
}
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index f262c99a7bb..f77aa01a2b8 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.103 2007/09/15 10:10:37 martin Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.104 2007/10/29 14:12:19 chl Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -334,7 +334,7 @@ sys_execve(struct proc *p, void *v, register_t *retval)
free(*tmpfap, M_EXEC);
tmpfap++; argc++;
}
- FREE(pack.ep_fa, M_EXEC);
+ free(pack.ep_fa, M_EXEC);
pack.ep_flags &= ~EXEC_HASARGL;
}
@@ -676,7 +676,7 @@ bad:
if (pack.ep_interp != NULL)
pool_put(&namei_pool, pack.ep_interp);
if (pack.ep_emul_arg != NULL)
- FREE(pack.ep_emul_arg, M_TEMP);
+ free(pack.ep_emul_arg, M_TEMP);
/* close and put the exec'd file */
vn_close(pack.ep_vp, FREAD, cred, p);
pool_put(&namei_pool, nid.ni_cnd.cn_pnbuf);
@@ -705,7 +705,7 @@ exec_abort:
if (pack.ep_interp != NULL)
pool_put(&namei_pool, pack.ep_interp);
if (pack.ep_emul_arg != NULL)
- FREE(pack.ep_emul_arg, M_TEMP);
+ free(pack.ep_emul_arg, M_TEMP);
pool_put(&namei_pool, nid.ni_cnd.cn_pnbuf);
vn_close(pack.ep_vp, FREAD, cred, p);
uvm_km_free_wakeup(exec_map, (vaddr_t) argp, NCARGS);
diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c
index 8abf7606f98..b14df59eceb 100644
--- a/sys/kern/kern_lkm.c
+++ b/sys/kern/kern_lkm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_lkm.c,v 1.43 2006/11/15 17:25:40 jmc Exp $ */
+/* $OpenBSD: kern_lkm.c,v 1.44 2007/10/29 14:12:19 chl Exp $ */
/* $NetBSD: kern_lkm.c,v 1.31 1996/03/31 21:40:27 christos Exp $ */
/*
@@ -151,7 +151,7 @@ lkmalloc(void)
struct lkm_table *p, *ret = NULL;
int id = 0;
- MALLOC(ret, struct lkm_table *, sizeof(*ret), M_DEVBUF, M_WAITOK);
+ ret = malloc(sizeof(*ret), M_DEVBUF, M_WAITOK);
ret->refcnt = ret->depcnt = 0;
ret->sym_id = -1;
/*
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 928305b2cd9..f1d0ff17c2a 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.73 2007/09/07 15:00:20 art Exp $ */
+/* $OpenBSD: tty.c,v 1.74 2007/10/29 14:12:19 chl Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -2268,7 +2268,7 @@ ttyfree(struct tty *tp)
clfree(&tp->t_rawq);
clfree(&tp->t_canq);
clfree(&tp->t_outq);
- FREE(tp, M_TTYS);
+ free(tp, M_TTYS);
}
struct itty *ttystats;
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 752b7bbc652..fb082878136 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.157 2007/09/15 19:22:18 bluhm Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.158 2007/10/29 14:12:19 chl Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -536,8 +536,8 @@ loop:
* Common case is actually in the if statement
*/
if (vp == NULL || !(vp->v_tag == VT_NON && vp->v_type == VBLK)) {
- MALLOC(nvp->v_specinfo, struct specinfo *,
- sizeof(struct specinfo), M_VNODE, M_WAITOK);
+ nvp->v_specinfo = malloc(sizeof(struct specinfo), M_VNODE,
+ M_WAITOK);
nvp->v_rdev = nvp_rdev;
nvp->v_hashchain = vpp;
nvp->v_specnext = *vpp;
@@ -1059,7 +1059,7 @@ vgonel(struct vnode *vp, struct proc *p)
vx->v_flag &= ~VALIASED;
vp->v_flag &= ~VALIASED;
}
- FREE(vp->v_specinfo, M_VNODE);
+ free(vp->v_specinfo, M_VNODE);
vp->v_specinfo = NULL;
}
/*