diff options
-rw-r--r-- | sys/compat/common/uipc_syscalls_43.c | 14 | ||||
-rw-r--r-- | sys/compat/linux/linux_exec.c | 13 | ||||
-rw-r--r-- | sys/compat/ultrix/ultrix_fs.c | 6 |
3 files changed, 17 insertions, 16 deletions
diff --git a/sys/compat/common/uipc_syscalls_43.c b/sys/compat/common/uipc_syscalls_43.c index c46843a9a3e..f047c1b609e 100644 --- a/sys/compat/common/uipc_syscalls_43.c +++ b/sys/compat/common/uipc_syscalls_43.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_syscalls_43.c,v 1.7 2003/06/02 23:27:59 millert Exp $ */ +/* $OpenBSD: uipc_syscalls_43.c,v 1.8 2007/10/30 12:09:22 gilles Exp $ */ /* $NetBSD: uipc_syscalls_43.c,v 1.5 1996/03/14 19:31:50 christos Exp $ */ /* @@ -218,8 +218,8 @@ compat_43_sys_recvmsg(p, v, retval) if (msg.msg_iovlen <= 0 || msg.msg_iovlen > IOV_MAX) return (EMSGSIZE); if (msg.msg_iovlen > UIO_SMALLIOV) - MALLOC(iov, struct iovec *, - sizeof(struct iovec) * msg.msg_iovlen, M_IOV, M_WAITOK); + iov = malloc(sizeof(struct iovec) * msg.msg_iovlen, + M_IOV, M_WAITOK); else iov = aiov; msg.msg_flags = SCARG(uap, flags) | MSG_COMPAT; @@ -236,7 +236,7 @@ compat_43_sys_recvmsg(p, v, retval) (caddr_t)&SCARG(uap, msg)->msg_accrightslen, sizeof (int)); done: if (iov != aiov) - FREE(iov, M_IOV); + free(iov, M_IOV); return (error); } #endif @@ -290,8 +290,8 @@ compat_43_sys_sendmsg(p, v, retval) if (msg.msg_iovlen <= 0 || msg.msg_iovlen > IOV_MAX) return (EMSGSIZE); if (msg.msg_iovlen > UIO_SMALLIOV) - MALLOC(iov, struct iovec *, - sizeof(struct iovec) * msg.msg_iovlen, M_IOV, M_WAITOK); + iov = malloc(sizeof(struct iovec) * msg.msg_iovlen, + M_IOV, M_WAITOK); else iov = aiov; error = copyin((caddr_t)msg.msg_iov, (caddr_t)iov, @@ -303,7 +303,7 @@ compat_43_sys_sendmsg(p, v, retval) error = sendit(p, SCARG(uap, s), &msg, SCARG(uap, flags), retval); done: if (iov != aiov) - FREE(iov, M_IOV); + free(iov, M_IOV); return (error); } #endif diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c index 7a265c31dba..1611639b241 100644 --- a/sys/compat/linux/linux_exec.c +++ b/sys/compat/linux/linux_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_exec.c,v 1.26 2007/09/01 15:14:44 martin Exp $ */ +/* $OpenBSD: linux_exec.c,v 1.27 2007/10/30 12:09:22 gilles Exp $ */ /* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */ /*- @@ -154,11 +154,12 @@ linux_e_proc_init(p, vmspace) { if (!p->p_emuldata) { /* allocate new Linux emuldata */ - MALLOC(p->p_emuldata, void *, sizeof(struct linux_emuldata), - M_EMULDATA, M_WAITOK); + p->p_emuldata = malloc(sizeof(struct linux_emuldata), + M_EMULDATA, M_WAITOK|M_ZERO); + } + else { + memset(p->p_emuldata, '\0', sizeof(struct linux_emuldata)); } - - memset(p->p_emuldata, '\0', sizeof(struct linux_emuldata)); /* Set the process idea of the break to the real value */ ((struct linux_emuldata *)(p->p_emuldata))->p_break = @@ -182,7 +183,7 @@ linux_e_proc_exit(p) struct proc *p; { /* free Linux emuldata and set the pointer to null */ - FREE(p->p_emuldata, M_EMULDATA); + free(p->p_emuldata, M_EMULDATA); p->p_emuldata = NULL; } diff --git a/sys/compat/ultrix/ultrix_fs.c b/sys/compat/ultrix/ultrix_fs.c index 6cacd7bd561..041306217fe 100644 --- a/sys/compat/ultrix/ultrix_fs.c +++ b/sys/compat/ultrix/ultrix_fs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ultrix_fs.c,v 1.14 2006/03/05 21:48:56 miod Exp $ */ +/* $OpenBSD: ultrix_fs.c,v 1.15 2007/10/30 12:09:22 gilles Exp $ */ /* $NetBSD: ultrix_fs.c,v 1.4 1996/04/07 17:23:06 jonathan Exp $ */ /* @@ -223,7 +223,7 @@ ultrix_sys_getmnt(p, v, retval) * Only get info on mountpoints that matches the path * provided. */ - MALLOC(path, char *, MAXPATHLEN, M_TEMP, M_WAITOK); + path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); if ((error = copyinstr(SCARG(uap, path), path, MAXPATHLEN, NULL)) != 0) goto bad; @@ -279,7 +279,7 @@ ultrix_sys_getmnt(p, v, retval) bad: if (path) - FREE(path, M_TEMP); + free(path, M_TEMP); return (error); } |