summaryrefslogtreecommitdiff
path: root/lib/libc/gen/exec.c
diff options
context:
space:
mode:
authorjtc <jtc@NetBSD.org>1993-11-24 19:43:49 +0000
committerjtc <jtc@NetBSD.org>1993-11-24 19:43:49 +0000
commit9bd83209f0618375e2dc4884c1210ccdc092d4ef (patch)
tree2ecb90407cd79771cd49c9b36b23f1563803a181 /lib/libc/gen/exec.c
parente985f4041a3ca1a7f3c8b537514145f1bd06b407 (diff)
Change C library functions to use strchr() and strrchr() instead of index()
and rindex(). This will allow (strict {ANSI, POSIX, XOPEN}) applications to redefine index() and rindex() without effecting the library internals.
Diffstat (limited to 'lib/libc/gen/exec.c')
-rw-r--r--lib/libc/gen/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c
index f18f8ee885b..89511d5497a 100644
--- a/lib/libc/gen/exec.c
+++ b/lib/libc/gen/exec.c
@@ -33,7 +33,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)exec.c 5.9 (Berkeley) 6/17/91";*/
-static char *rcsid = "$Id: exec.c,v 1.4 1993/10/22 19:13:42 pk Exp $";
+static char *rcsid = "$Id: exec.c,v 1.5 1993/11/24 19:43:49 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -186,7 +186,7 @@ execvp(name, argv)
char *bp, *cur, *path, buf[MAXPATHLEN];
/* If it's an absolute or relative path name, it's easy. */
- if (index(name, '/')) {
+ if (strchr(name, '/')) {
bp = (char *)name;
cur = path = NULL;
goto retry;