From c3704d0b0343a02a99cb63757f9c34d82c8e5005 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 14 Oct 2009 07:19:06 +0000 Subject: 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@ --- sys/kern/tty_pty.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'sys') 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; -- cgit v1.2.3