summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2014-11-26 18:34:53 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2014-11-26 18:34:53 +0000
commit35b8c30a6f0433fcbf29d035097c44d0fb8cac09 (patch)
tree42906177e3c7862b1acb0b679e9aa9d3377462ea /usr.bin/ssh
parent5482bf416acec0fc5e5f09533eef538962865157 (diff)
Prefer setvbuf() to setlinebuf() for portability; ok deraadt@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/sftp.c6
-rw-r--r--usr.bin/ssh/ssh-add.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c
index 43f8745a88f..12d30d6239b 100644
--- a/usr.bin/ssh/sftp.c
+++ b/usr.bin/ssh/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.167 2014/10/06 00:47:15 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.168 2014/11/26 18:34:51 millert Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -2059,8 +2059,8 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
free(dir);
}
- setlinebuf(stdout);
- setlinebuf(infile);
+ setvbuf(stdout, NULL, _IOLBF, 0);
+ setvbuf(infile, NULL, _IOLBF, 0);
interactive = !batchmode && isatty(STDIN_FILENO);
err = 0;
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c
index 3265072f7a6..fa224afe541 100644
--- a/usr.bin/ssh/ssh-add.c
+++ b/usr.bin/ssh/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.113 2014/07/09 14:15:56 benno Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.114 2014/11/26 18:34:51 millert Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -428,7 +428,7 @@ main(int argc, char **argv)
OpenSSL_add_all_algorithms();
- setlinebuf(stdout);
+ setvbuf(stdout, NULL, _IOLBF, 0);
/* At first, get a connection to the authentication agent. */
ac = ssh_get_authentication_connection();