diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-01-19 17:54:57 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-01-19 17:54:57 +0000 |
commit | 12fe641ea8c8836df2c10b83bf985c7021dcd54d (patch) | |
tree | eff556a7cae59d77d97c185cc78947877d9c3b06 /sys/compat | |
parent | 9f1866c3e0efe0c56d0d5387bcaf845852f74f56 (diff) |
redo (w/ proper changes everywhere ;):
take interp[MAXPATHLEN] off the stack. from mickey, ok otto
while here, switch above from malloc to pool, remove stupid casts
tedu@ miod@ ok
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/freebsd/freebsd_exec.c | 4 | ||||
-rw-r--r-- | sys/compat/linux/linux_exec.c | 4 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_exec.c | 4 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_exec.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sys/compat/freebsd/freebsd_exec.c b/sys/compat/freebsd/freebsd_exec.c index f8f496577a6..6c545c299ca 100644 --- a/sys/compat/freebsd/freebsd_exec.c +++ b/sys/compat/freebsd/freebsd_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: freebsd_exec.c,v 1.16 2004/04/15 00:22:42 tedu Exp $ */ +/* $OpenBSD: freebsd_exec.c,v 1.17 2006/01/19 17:54:50 mickey Exp $ */ /* $NetBSD: freebsd_exec.c,v 1.2 1996/05/18 16:02:08 christos Exp $ */ /* @@ -174,7 +174,7 @@ freebsd_elf_probe(p, epp, itp, pos, os) if (brand == NULL || strcmp(brand, "FreeBSD") != 0) return (EINVAL); } - if (itp[0]) { + if (itp) { if ((error = emul_find(p, NULL, freebsd_emul_path, itp, &bp, 0))) return (error); if ((error = copystr(bp, itp, MAXPATHLEN, &len))) diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c index b96be60a26b..ae096b470a5 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.24 2005/12/30 19:46:55 miod Exp $ */ +/* $OpenBSD: linux_exec.c,v 1.25 2006/01/19 17:54:52 mickey Exp $ */ /* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */ /*- @@ -485,7 +485,7 @@ linux_elf_probe(p, epp, itp, pos, os) brand = elf32_check_brand(eh); if (brand && strcmp(brand, "Linux")) return (EINVAL); - if (itp[0]) { + if (itp) { if ((error = emul_find(p, NULL, linux_emul_path, itp, &bp, 0))) return (error); if ((error = copystr(bp, itp, MAXPATHLEN, &len))) diff --git a/sys/compat/netbsd/netbsd_exec.c b/sys/compat/netbsd/netbsd_exec.c index d6c7f9e2910..65df435fbe3 100644 --- a/sys/compat/netbsd/netbsd_exec.c +++ b/sys/compat/netbsd/netbsd_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netbsd_exec.c,v 1.11 2004/04/15 00:22:42 tedu Exp $ */ +/* $OpenBSD: netbsd_exec.c,v 1.12 2006/01/19 17:54:54 mickey Exp $ */ /* $NetBSD: svr4_exec.c,v 1.16 1995/10/14 20:24:20 christos Exp $ */ /* @@ -94,7 +94,7 @@ netbsd_elf64_probe(p, epp, itp, pos, os) if (elf64_os_pt_note(p, epp, eh, "NetBSD\0", 7, 4)) return (EINVAL); - if (itp[0]) { + if (itp) { if ((error = emul_find(p, NULL, netbsd_emul_path, itp, &bp, 0))) return (error); if ((error = copystr(bp, itp, MAXPATHLEN, &len))) diff --git a/sys/compat/svr4/svr4_exec.c b/sys/compat/svr4/svr4_exec.c index fdfe8756bc1..0f06a6ce105 100644 --- a/sys/compat/svr4/svr4_exec.c +++ b/sys/compat/svr4/svr4_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_exec.c,v 1.14 2002/03/14 01:26:51 millert Exp $ */ +/* $OpenBSD: svr4_exec.c,v 1.15 2006/01/19 17:54:56 mickey Exp $ */ /* $NetBSD: svr4_exec.c,v 1.16 1995/10/14 20:24:20 christos Exp $ */ /* @@ -126,7 +126,7 @@ svr4_elf_probe(p, epp, itp, pos, os) int error; size_t len; - if (itp[0]) { + if (itp) { if ((error = emul_find(p, NULL, svr4_emul_path, itp, &bp, 0))) return (error); if ((error = copystr(bp, itp, MAXPATHLEN, &len))) |