aboutsummaryrefslogtreecommitdiff
path: root/libexec/rlogind/rlogind.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rlogind/rlogind.c')
-rw-r--r--libexec/rlogind/rlogind.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index 2c2c9ef6cc8f..be92f0f6baa9 100644
--- a/libexec/rlogind/rlogind.c
+++ b/libexec/rlogind/rlogind.c
@@ -543,16 +543,17 @@ extern char **environ;
void
setup_term(int fd)
{
- char *cp = index(term+ENVSIZE, '/');
+ char *cp;
char *speed;
struct termios tt, def;
+ cp = strchr(term + ENVSIZE, '/');
#ifndef notyet
tcgetattr(fd, &tt);
if (cp) {
*cp++ = '\0';
speed = cp;
- cp = index(speed, '/');
+ cp = strchr(speed, '/');
if (cp)
*cp++ = '\0';
cfsetspeed(&tt, atoi(speed));
@@ -567,7 +568,7 @@ setup_term(int fd)
if (cp) {
*cp++ = '\0';
speed = cp;
- cp = index(speed, '/');
+ cp = strchr(speed, '/');
if (cp)
*cp++ = '\0';
tcgetattr(fd, &tt);