summaryrefslogtreecommitdiff
path: root/lib/libc/gen/ttyslot.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-07-09 00:28:27 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-07-09 00:28:27 +0000
commit315b15886dcaaaf8e2bf474739d7c019d3f2396a (patch)
treeb6a5e02a1dcf64a84311735748bf20f369349d40 /lib/libc/gen/ttyslot.c
parentb1bb9f5345c5435d25c09476bcc489d0d649b747 (diff)
Clean up some -Wall complaints.
Diffstat (limited to 'lib/libc/gen/ttyslot.c')
-rw-r--r--lib/libc/gen/ttyslot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/gen/ttyslot.c b/lib/libc/gen/ttyslot.c
index 52fc873f80d..779cb37ce0c 100644
--- a/lib/libc/gen/ttyslot.c
+++ b/lib/libc/gen/ttyslot.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ttyslot.c,v 1.2 1996/08/19 08:27:04 tholo Exp $";
+static char rcsid[] = "$OpenBSD: ttyslot.c,v 1.3 1997/07/09 00:28:26 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <ttyent.h>
@@ -50,13 +50,13 @@ ttyslot()
char *name;
setttyent();
- for (cnt = 0; cnt < 3; ++cnt)
- if (name = ttyname(cnt)) {
- if (p = strrchr(name, '/'))
+ for (cnt = 0; cnt < 3; ++cnt)
+ if ((name = ttyname(cnt))) {
+ if ((p = strrchr(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);