about summary refs log tree commit diff
path: root/misc/ttyslot.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ttyslot.c')
-rw-r--r--misc/ttyslot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/ttyslot.c b/misc/ttyslot.c
index 0ed14d73ea..2f3c7953d7 100644
--- a/misc/ttyslot.c
+++ b/misc/ttyslot.c
@@ -56,7 +56,7 @@ ttyslot (void)
 	__setttyent();
 	for (cnt = 0; cnt < 3; ++cnt)
 		if (__ttyname_r (cnt, name, buflen) == 0) {
-			if ((p = rindex(name, '/')))
+			if ((p = strrchr (name, '/')))
 				++p;
 			else
 				p = name;