summaryrefslogtreecommitdiff
path: root/libc/misc/ttyent/getttyent.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-11-10 14:43:07 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-11-10 14:43:07 +0000
commitea650dfc5bf37fb36ff8d831a153ddc01a59adeb (patch)
tree7e1c0ab4f055619b89a78550bfde4b7784a4eadb /libc/misc/ttyent/getttyent.c
parent31307f870770f7af155f434fffea455fe6b5f29c (diff)
Use strchr instead of index (BSD)
Diffstat (limited to 'libc/misc/ttyent/getttyent.c')
-rw-r--r--libc/misc/ttyent/getttyent.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c
index 6e2fbd2f4..d7d77c1ba 100644
--- a/libc/misc/ttyent/getttyent.c
+++ b/libc/misc/ttyent/getttyent.c
@@ -96,7 +96,7 @@ static char * skip(register char *p)
static char * value(register char *p)
{
- return ((p = index(p, '=')) ? ++p : NULL);
+ return ((p = strchr(p, '=')) ? ++p : NULL);
}
struct ttyent * getttyent(void)
@@ -122,7 +122,7 @@ struct ttyent * getttyent(void)
return (NULL);
}
/* skip lines that are too big */
- if (!index(p, '\n')) {
+ if (!strchr(p, '\n')) {
while ((c = getc_unlocked(tf)) != '\n' && c != EOF)
;
continue;
@@ -171,7 +171,7 @@ struct ttyent * 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);
}