summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2006-03-14 22:08:01 +0000
committerderaadt <deraadt@openbsd.org>2006-03-14 22:08:01 +0000
commitc3a8e0391bc9476f75bb5cb4b3a452d1081ee0f0 (patch)
tree9aac303929d286c250bb717dd6e14737b977fcb8
parentdelete lint balony from another era; adobriyan@gmail, ok tedu (diff)
downloadwireguard-openbsd-c3a8e0391bc9476f75bb5cb4b3a452d1081ee0f0.tar.xz
wireguard-openbsd-c3a8e0391bc9476f75bb5cb4b3a452d1081ee0f0.zip
only santa checks things twice; from adobriyan@gmail; ok tedu
-rw-r--r--bin/ksh/tty.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/ksh/tty.c b/bin/ksh/tty.c
index 9546724faf3..2751c5a2cf7 100644
--- a/bin/ksh/tty.c
+++ b/bin/ksh/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.8 2005/03/30 17:16:37 deraadt Exp $ */
+/* $OpenBSD: tty.c,v 1.9 2006/03/14 22:08:01 deraadt Exp $ */
#include "sh.h"
#include <sys/stat.h>
@@ -22,12 +22,9 @@ tty_init(int init_ttystate)
tty_devtty = 1;
if ((tfd = open("/dev/tty", O_RDWR, 0)) < 0) {
- if (tfd < 0) {
- tty_devtty = 0;
- warningf(false,
- "No controlling tty (open /dev/tty: %s)",
- strerror(errno));
- }
+ tty_devtty = 0;
+ warningf(false, "No controlling tty (open /dev/tty: %s)",
+ strerror(errno));
}
if (tfd < 0) {