diff options
Diffstat (limited to 'misc/ttyslot.c')
-rw-r--r-- | misc/ttyslot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/ttyslot.c b/misc/ttyslot.c index 430f9c0..7dc9b27 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); |