summaryrefslogtreecommitdiff
path: root/misc/ttyslot.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ttyslot.c')
-rw-r--r--misc/ttyslot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/ttyslot.c b/misc/ttyslot.c
index 430f9c02d0..7dc9b27c0c 100644
--- a/misc/ttyslot.c
+++ b/misc/ttyslot.c
@@ -60,11 +60,11 @@ ttyslot()
setttyent();
for (cnt = 0; cnt < 3; ++cnt)
if (__ttyname_r (cnt, name, buflen) == 0) {
- if (p = rindex(name, '/'))
+ if ((p = rindex(name, '/')))
++p;
else
p = name;
- for (slot = 1; ttyp = getttyent(); ++slot)
+ for (slot = 1; (ttyp = getttyent()); ++slot)
if (!strcmp(ttyp->ty_name, p)) {
endttyent();
return(slot);