summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshpty.c')
-rw-r--r--sshpty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sshpty.c b/sshpty.c
index 15da8c64..b8457d91 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -155,11 +155,11 @@ pty_make_controlling_tty(int *ttyfd, const char *tty)
error("SETPGRP %s",strerror(errno));
#endif /* NEED_SETPGRP */
fd = open(tty, O_RDWR);
- if (fd < 0) {
+ if (fd < 0)
error("%.100s: %.100s", tty, strerror(errno));
- } else {
+ else
close(fd);
- }
+
/* Verify that we now have a controlling tty. */
fd = open(_PATH_TTY, O_WRONLY);
if (fd < 0)