summaryrefslogtreecommitdiffstats
path: root/bin/ksh/exec.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2017-12-27 13:02:57 +0000
committermillert <millert@openbsd.org>2017-12-27 13:02:57 +0000
commit201e0776e68df3547d24a3790d166bbefd438756 (patch)
tree6641963dd6823f21f53451d5686cd4996555f12a /bin/ksh/exec.c
parentImplement OF_getpropint64(). (diff)
downloadwireguard-openbsd-201e0776e68df3547d24a3790d166bbefd438756.tar.xz
wireguard-openbsd-201e0776e68df3547d24a3790d166bbefd438756.zip
Add -Wshadow to Makefile and fix the resulting warnings. Many of
the warnings are due to the use of globals with generic names, specifically "options" and "path". I've renamed "options" to "sh_options" since it holds the shell options and "path" to "search_path". OK jca@ tb@
Diffstat (limited to 'bin/ksh/exec.c')
-rw-r--r--bin/ksh/exec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c
index 054f8f3e7cc..09484b8cf75 100644
--- a/bin/ksh/exec.c
+++ b/bin/ksh/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.69 2017/12/18 20:30:14 anton Exp $ */
+/* $OpenBSD: exec.c,v 1.70 2017/12/27 13:02:57 millert Exp $ */
/*
* execute command tree
@@ -707,7 +707,7 @@ scriptexec(struct op *tp, char **ap)
shell = str_val(global("EXECSHELL"));
if (shell && *shell)
- shell = search(shell, path, X_OK, NULL);
+ shell = search(shell, search_path, X_OK, NULL);
if (!shell || !*shell)
shell = _PATH_BSHELL;
@@ -900,8 +900,8 @@ findcom(const char *name, int flags)
}
tp->flag = DEFINED; /* make ~ISSET */
}
- npath = search(name, flags & FC_DEFPATH ? def_path : path,
- X_OK, &tp->u2.errno_);
+ npath = search(name, flags & FC_DEFPATH ? def_path :
+ search_path, X_OK, &tp->u2.errno_);
if (npath) {
if (tp == &temp) {
tp->val.s = npath;