diff toys/which.c @ 535:d51be130fda2

More stabs at getting #includes right, and moving off of deprecated functions.
author Rob Landley <rob@landley.net>
date Thu, 08 Mar 2012 20:14:55 -0600
parents 5a0faa267866
children 1e8b9acdafeb
line wrap: on
line diff
--- a/toys/which.c	Wed Mar 07 20:05:36 2012 -0600
+++ b/toys/which.c	Thu Mar 08 20:14:55 2012 -0600
@@ -30,7 +30,7 @@
 
 	// 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;