summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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
-rw-r--r--lib/libcam/camlib.c2
-rw-r--r--lib/libstand/bootp.c6
-rw-r--r--lib/libutil/quotafile.c2
8 files changed, 12 insertions, 12 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");
diff --git a/lib/libcam/camlib.c b/lib/libcam/camlib.c
index 47ca384..525ad2f 100644
--- a/lib/libcam/camlib.c
+++ b/lib/libcam/camlib.c
@@ -137,7 +137,7 @@ cam_get_device(const char *path, char *dev_name, int devnamelen, int *unit)
*/
if (*tmpstr == '/') {
tmpstr2 = tmpstr;
- tmpstr = (char *)rindex(tmpstr2, '/');
+ tmpstr = strrchr(tmpstr2, '/');
if ((tmpstr != NULL) && (*tmpstr != '\0'))
tmpstr++;
}
diff --git a/lib/libstand/bootp.c b/lib/libstand/bootp.c
index eb4a8ba..904b3ba 100644
--- a/lib/libstand/bootp.c
+++ b/lib/libstand/bootp.c
@@ -703,13 +703,13 @@ setenv_(u_char *cp, u_char *ep, struct dhcp_opt *opts)
u_char *s = NULL; /* semicolon ? */
/* skip leading whitespace */
- while (*endv && index(" \t\n\r", *endv))
+ while (*endv && strchr(" \t\n\r", *endv))
endv++;
- vp = index(endv, '='); /* find name=value separator */
+ vp = strchr(endv, '='); /* find name=value separator */
if (!vp)
break;
*vp++ = 0;
- if (op->fmt == __ILIST && (s = index(vp, ';')))
+ if (op->fmt == __ILIST && (s = strchr(vp, ';')))
*s++ = '\0';
setenv(endv, vp, 1);
vp = s; /* prepare for next round */
diff --git a/lib/libutil/quotafile.c b/lib/libutil/quotafile.c
index 0fda5f6..03e3de4 100644
--- a/lib/libutil/quotafile.c
+++ b/lib/libutil/quotafile.c
@@ -84,7 +84,7 @@ hasquota(struct fstab *fs, int type, char *qfnamep, int qfbufsize)
}
strcpy(buf, fs->fs_mntops);
for (opt = strtok(buf, ","); opt; opt = strtok(NULL, ",")) {
- if ((cp = index(opt, '=')))
+ if ((cp = strchr(opt, '=')))
*cp++ = '\0';
if (type == USRQUOTA && strcmp(opt, usrname) == 0)
break;
OpenPOWER on IntegriCloud