aboutsummaryrefslogtreecommitdiff
path: root/toys/which.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/which.c')
-rw-r--r--toys/which.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/which.c b/toys/which.c
index 13198363..0ffc725a 100644
--- a/toys/which.c
+++ b/toys/which.c
@@ -30,7 +30,7 @@ static int which_in_path(char *filename)
// If they gave us a path, don't worry about $PATH or -a
- if (index(filename, '/')) {
+ if (strchr(filename, '/')) {
// Confirm it has the executable bit set, and it's not a directory.
if (!access(filename, X_OK)) {
struct stat st;