diff options
| author | christos <christos@NetBSD.org> | 2005-05-29 22:08:16 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2005-05-29 22:08:16 +0000 |
| commit | fb4b40b7e88f729bb1ceefb180c21d3ac2be1daf (patch) | |
| tree | 5c76a5462f20c8a6e937d338b4fa61db995de85b /sys/compat/linux/common/linux_exec_elf32.c | |
| parent | 1473b3a0a174d07386ce91cb2a8df7d3ce64d38c (diff) | |
- sprinkle const.
- add XXXUNCONST to the emul_find() pbuf argument free'ing. XXX: this needs
an api change.
- avoid variable shadowing.
Diffstat (limited to 'sys/compat/linux/common/linux_exec_elf32.c')
| -rw-r--r-- | sys/compat/linux/common/linux_exec_elf32.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/linux/common/linux_exec_elf32.c b/sys/compat/linux/common/linux_exec_elf32.c index c1666ca9518..0e31282a5b5 100644 --- a/sys/compat/linux/common/linux_exec_elf32.c +++ b/sys/compat/linux/common/linux_exec_elf32.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_elf32.c,v 1.68 2005/05/03 16:26:28 manu Exp $ */ +/* $NetBSD: linux_exec_elf32.c,v 1.69 2005/05/29 22:08:16 christos Exp $ */ /*- * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.68 2005/05/03 16:26:28 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.69 2005/05/29 22:08:16 christos Exp $"); #ifndef ELFSIZE /* XXX should die */ @@ -186,7 +186,7 @@ ELFNAME2(linux,gcc_signature)(p, epp, eh) size_t shsize; size_t i; static const char signature[] = "\0GCC: (GNU) "; - char buf[sizeof(signature) - 1]; + char tbuf[sizeof(signature) - 1]; Elf_Shdr *sh; int error; @@ -210,7 +210,7 @@ ELFNAME2(linux,gcc_signature)(p, epp, eh) s->sh_size < sizeof(signature) - 1) continue; - error = exec_read_from(p, epp->ep_vp, s->sh_offset, buf, + error = exec_read_from(p, epp->ep_vp, s->sh_offset, tbuf, sizeof(signature) - 1); if (error) continue; @@ -218,8 +218,8 @@ ELFNAME2(linux,gcc_signature)(p, epp, eh) /* * error is 0, if the signatures match we are done. */ - DPRINTF(("linux_gcc_sig: sig=%s\n", buf)); - if (!memcmp(buf, signature, sizeof(signature) - 1)) { + DPRINTF(("linux_gcc_sig: sig=%s\n", tbuf)); + if (!memcmp(tbuf, signature, sizeof(signature) - 1)) { error = 0; goto out; } |
