diff options
Diffstat (limited to 'lib/libc/gen/getttyent.c')
-rw-r--r-- | lib/libc/gen/getttyent.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 |