summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-04-11 16:41:31 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-04-11 16:41:31 +0000
commit8e9986215e5b1150f8af7a608f822ba91d1a5096 (patch)
treef37260bc6a90bcdd640c85d30d1cbd7e3774c939 /sys/kern
parentb6a97829ca2a3addc2c2b3fbab604c120eff7882 (diff)
Fix calculation of the index into TTY_LETTERS. This only worked
because sizeof(TTY_LETTERS) == sizeof(TTY_SUFFIX).
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/tty_pty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index f4cf902e880..5a4506f960e 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_pty.c,v 1.20 2004/02/23 21:17:54 beck Exp $ */
+/* $OpenBSD: tty_pty.c,v 1.21 2004/04/11 16:41:30 millert Exp $ */
/* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */
/*
@@ -130,7 +130,7 @@ ptydevname(int minor, struct pt_softc *pti)
char buf[11] = "/dev/XtyXX";
int i, j;
- i = minor / (sizeof(TTY_LETTERS) - 1);
+ i = minor / (sizeof(TTY_SUFFIX) - 1);
j = minor % (sizeof(TTY_SUFFIX) - 1);
if (i >= sizeof(TTY_LETTERS) - 1) {
pti->pty_pn[0] = '\0';