diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-10-14 07:19:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-10-14 07:19:06 +0000 |
commit | c3704d0b0343a02a99cb63757f9c34d82c8e5005 (patch) | |
tree | 6b3918408f275d3725e405616e8af5717ff76062 /sys | |
parent | c6ede121b1762741639518c5c6106f592573325d (diff) |
Remove a redundant if (maxpty == npty) in check_pty - this is also tested by
the two ifs at the start of the function and both variables are only altered
under pt_softc_lock so cannot change between the checks.
ok guenther@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/tty_pty.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index f7f53412ca6..784a237eb6c 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.39 2009/09/29 17:26:09 deraadt Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.40 2009/10/14 07:19:05 nicm Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -185,10 +185,6 @@ check_pty(int minor) newnpty = maxptys; newpt = ptyarralloc(newnpty); - if (maxptys == npty) { - goto limit_reached; - } - memcpy(newpt, pt_softc, npty * sizeof(struct pt_softc *)); free(pt_softc, M_DEVBUF); pt_softc = newpt; |