diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-11-18 03:14:53 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-11-18 03:14:53 +0000 |
commit | f87c7bd4133a2b3ad9b45c32fab33d167a348c4b (patch) | |
tree | 7259957b97704c375b3d8ab42f8da3d52665845e /libc/misc/ttyent/getttyent.c | |
parent | 164a928b77f596b6617a4bbf43a2c06bc35a5602 (diff) | |
download | uClibc-alpine-f87c7bd4133a2b3ad9b45c32fab33d167a348c4b.tar.bz2 uClibc-alpine-f87c7bd4133a2b3ad9b45c32fab33d167a348c4b.tar.xz |
Massive merge from trunk.
Diffstat (limited to 'libc/misc/ttyent/getttyent.c')
-rw-r--r-- | libc/misc/ttyent/getttyent.c | 6 |
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); } |