diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-03-30 17:16:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-03-30 17:16:38 +0000 |
commit | 5337e301d74fd022c6b947fa978a12121f5e8f9f (patch) | |
tree | 31f24adfb3fb3e4d0e0e7aaca4e7dbd6cc0df942 /bin/ksh/tty.c | |
parent | a47df1829eb3be603b20e38db0ab7b904b14f545 (diff) |
lots of indentation cleanup, now ksh is readable like our other code.
double checked to make sure no binaries change, and eyed by niallo
Diffstat (limited to 'bin/ksh/tty.c')
-rw-r--r-- | bin/ksh/tty.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/ksh/tty.c b/bin/ksh/tty.c index 20953494acb..9546724faf3 100644 --- a/bin/ksh/tty.c +++ b/bin/ksh/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.7 2004/12/22 17:14:34 millert Exp $ */ +/* $OpenBSD: tty.c,v 1.8 2005/03/30 17:16:37 deraadt Exp $ */ #include "sh.h" #include <sys/stat.h> @@ -22,12 +22,11 @@ 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)); + "No controlling tty (open /dev/tty: %s)", + strerror(errno)); } } @@ -44,10 +43,10 @@ tty_init(int init_ttystate) } if ((tty_fd = fcntl(tfd, F_DUPFD, FDBASE)) < 0) { warningf(false, "j_ttyinit: dup of tty fd failed: %s", - strerror(errno)); + strerror(errno)); } else if (fcntl(tty_fd, F_SETFD, FD_CLOEXEC) < 0) { warningf(false, "j_ttyinit: can't set close-on-exec flag: %s", - strerror(errno)); + strerror(errno)); close(tty_fd); tty_fd = -1; } else if (init_ttystate) |