diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/builtin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 8a33a5312..e73a7a452 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2468,14 +2468,14 @@ bin_whence(char *nam, char **argv, char *ops, int func) /* Option -a is to search the entire path, * * rather than just looking for one match. */ if (all) { - char **pp, *buf, *z; + char **pp, *buf; pushheap(); for (pp = path; *pp; pp++) { if (**pp) { - z = dyncat(*pp, "/"); - } else z = NULL; - buf = dyncat(z, *argv); + buf = zhtricat(*pp, "/", *argv); + } else buf = ztrdup(*argv); + if (iscom(buf)) { if (wd) { printf("%s: command\n", *argv); |