diff options
| author | jtc <jtc@NetBSD.org> | 1993-11-24 19:43:49 +0000 |
|---|---|---|
| committer | jtc <jtc@NetBSD.org> | 1993-11-24 19:43:49 +0000 |
| commit | 9bd83209f0618375e2dc4884c1210ccdc092d4ef (patch) | |
| tree | 2ecb90407cd79771cd49c9b36b23f1563803a181 /lib/libc/stdlib | |
| parent | e985f4041a3ca1a7f3c8b537514145f1bd06b407 (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/stdlib')
| -rw-r--r-- | lib/libc/stdlib/putenv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/putenv.c b/lib/libc/stdlib/putenv.c index db605b23c97..7a8c4653cf6 100644 --- a/lib/libc/stdlib/putenv.c +++ b/lib/libc/stdlib/putenv.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)putenv.c 5.4 (Berkeley) 2/23/91";*/ -static char *rcsid = "$Id: putenv.c,v 1.3 1993/08/26 00:48:05 jtc Exp $"; +static char *rcsid = "$Id: putenv.c,v 1.4 1993/11/24 19:44:13 jtc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdlib.h> @@ -48,7 +48,7 @@ putenv(str) if (!(p = strdup(str))) return(1); - if (!(equal = index(p, '='))) { + if (!(equal = strchr(p, '='))) { (void)free(p); return(1); } |
