summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-10-14 07:19:05 +0000
committernicm <nicm@openbsd.org>2009-10-14 07:19:05 +0000
commit1830bc66cb6061cc2ec91c929b08c8813ff8e18d (patch)
treeedba9fd7bc5351ddb80d09166d99fb13cd0ca9ec
parentrework how devids are handled in the midlayer and mpath. (diff)
downloadwireguard-openbsd-1830bc66cb6061cc2ec91c929b08c8813ff8e18d.tar.xz
wireguard-openbsd-1830bc66cb6061cc2ec91c929b08c8813ff8e18d.zip
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@
-rw-r--r--sys/kern/tty_pty.c6
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;