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