summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/exec.c2
-rw-r--r--lib/libc/gen/getttyent.c6
-rw-r--r--lib/libc/gen/timezone.c2
-rw-r--r--lib/libc/net/gethostbynis.c2
-rw-r--r--lib/libc/net/getnetbynis.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c
index b83136e..4998ee8 100644
--- a/lib/libc/gen/exec.c
+++ b/lib/libc/gen/exec.c
@@ -159,7 +159,7 @@ execvPe(const char *name, const char *path, char * const *argv,
eacces = 0;
/* If it's an absolute or relative path name, it's easy. */
- if (index(name, '/')) {
+ if (strchr(name, '/')) {
bp = name;
cur = NULL;
goto retry;
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c
index 9b9e3ea..f2fc298 100644
--- a/lib/libc/gen/getttyent.c
+++ b/lib/libc/gen/getttyent.c
@@ -78,7 +78,7 @@ getttyent(void)
if (!fgets(p = line, lbsize, tf))
return (NULL);
/* extend buffer if line was too big, and retry */
- while (!index(p, '\n') && !feof(tf)) {
+ while (!strchr(p, '\n') && !feof(tf)) {
i = strlen(p);
lbsize += MALLOCCHUNK;
if ((p = realloc(line, lbsize)) == NULL) {
@@ -148,7 +148,7 @@ getttyent(void)
tty.ty_comment = p;
if (*p == 0)
tty.ty_comment = 0;
- if ( (p = index(p, '\n')) )
+ if ((p = strchr(p, '\n')))
*p = '\0';
return (&tty);
}
@@ -196,7 +196,7 @@ static char *
value(char *p)
{
- return ((p = index(p, '=')) ? ++p : NULL);
+ return ((p = strchr(p, '=')) ? ++p : NULL);
}
int
diff --git a/lib/libc/gen/timezone.c b/lib/libc/gen/timezone.c
index 5f0fa66..9b50e79 100644
--- a/lib/libc/gen/timezone.c
+++ b/lib/libc/gen/timezone.c
@@ -59,7 +59,7 @@ timezone(int zone, int dst)
*end;
if ( (beg = getenv("TZNAME")) ) { /* set in environment */
- if ( (end = index(beg, ',')) ) {/* "PST,PDT" */
+ if ((end = strchr(beg, ','))) { /* "PST,PDT" */
if (dst)
return(++end);
*end = '\0';
diff --git a/lib/libc/net/gethostbynis.c b/lib/libc/net/gethostbynis.c
index 11de8ae..c0d5177 100644
--- a/lib/libc/net/gethostbynis.c
+++ b/lib/libc/net/gethostbynis.c
@@ -91,7 +91,7 @@ _gethostbynis(const char *name, char *map, int af, struct hostent *he,
free(result);
result = (char *)&ypbuf;
- if ((cp = index(result, '\n')))
+ if ((cp = strchr(result, '\n')))
*cp = '\0';
cp = strpbrk(result, " \t");
diff --git a/lib/libc/net/getnetbynis.c b/lib/libc/net/getnetbynis.c
index 811e431..1dbed83 100644
--- a/lib/libc/net/getnetbynis.c
+++ b/lib/libc/net/getnetbynis.c
@@ -80,7 +80,7 @@ _getnetbynis(const char *name, char *map, int af, struct netent *ne,
free(result);
result = (char *)&ypbuf;
- if ((cp = index(result, '\n')))
+ if ((cp = strchr(result, '\n')))
*cp = '\0';
cp = strpbrk(result, " \t");
OpenPOWER on IntegriCloud