summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sshpty.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-06-23 21:06:13 +0000
committerderaadt <deraadt@openbsd.org>2002-06-23 21:06:13 +0000
commit9a152882826b35ff62922164e7ab0e2c9886d407 (patch)
treee4829e41a15a51746a914b2bbd5f5e77f6b78b54 /usr.bin/ssh/sshpty.c
parentcompression_level is u_int (diff)
downloadwireguard-openbsd-9a152882826b35ff62922164e7ab0e2c9886d407.tar.xz
wireguard-openbsd-9a152882826b35ff62922164e7ab0e2c9886d407.zip
KNF
Diffstat (limited to 'usr.bin/ssh/sshpty.c')
-rw-r--r--usr.bin/ssh/sshpty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/sshpty.c b/usr.bin/ssh/sshpty.c
index 433511aec77..3350764f226 100644
--- a/usr.bin/ssh/sshpty.c
+++ b/usr.bin/ssh/sshpty.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshpty.c,v 1.5 2002/06/23 03:30:58 deraadt Exp $");
+RCSID("$OpenBSD: sshpty.c,v 1.6 2002/06/23 21:06:13 deraadt Exp $");
#include <util.h>
#include "sshpty.h"
@@ -225,9 +225,8 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
if (fd < 0)
error("open /dev/tty failed - could not set controlling tty: %.100s",
strerror(errno));
- else {
+ else
close(fd);
- }
}
/* Changes the window size associated with the pty. */
@@ -237,6 +236,7 @@ pty_change_window_size(int ptyfd, int row, int col,
int xpixel, int ypixel)
{
struct winsize w;
+
w.ws_row = row;
w.ws_col = col;
w.ws_xpixel = xpixel;
@@ -274,7 +274,7 @@ pty_setowner(struct passwd *pw, const char *ttyname)
if (st.st_uid != pw->pw_uid || st.st_gid != gid) {
if (chown(ttyname, pw->pw_uid, gid) < 0) {
if (errno == EROFS &&
- (st.st_uid == pw->pw_uid || st.st_uid == 0))
+ (st.st_uid == pw->pw_uid || st.st_uid == 0))
error("chown(%.100s, %u, %u) failed: %.100s",
ttyname, pw->pw_uid, gid,
strerror(errno));