summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2012-04-22 11:25:47 +1000
committerDamien Miller <djm@mindrot.org>2012-04-22 11:25:47 +1000
commit4922315d1d307394b40a12d8f7cbb2c0363c1517 (patch)
treec708426bd1a3fde7460ea8a9c2c036f6f35abf77
parent8fef9ebbab6bd68d245edbadedd52600a800c09c (diff)
- djm@cvs.openbsd.org 2012/04/20 03:24:23
[sftp.c] setlinebuf(3) is more readable than setvbuf(.., _IOLBF, ...)
-rw-r--r--ChangeLog3
-rw-r--r--sftp.c7
2 files changed, 4 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ca22714..b9fda322 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,9 @@
- djm@cvs.openbsd.org 2012/04/12 02:43:55
[sshd_config sshd_config.5]
mention AuthorizedPrincipalsFile=none default
+ - djm@cvs.openbsd.org 2012/04/20 03:24:23
+ [sftp.c]
+ setlinebuf(3) is more readable than setvbuf(.., _IOLBF, ...)
20120420
- (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
diff --git a/sftp.c b/sftp.c
index da7fbab3..22cf3145 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.134 2011/11/16 12:24:28 oga Exp $ */
+/* $OpenBSD: sftp.c,v 1.135 2012/04/20 03:24:23 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -1934,13 +1934,8 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
xfree(dir);
}
-#if defined(HAVE_SETVBUF) && !defined(BROKEN_SETVBUF)
- setvbuf(stdout, NULL, _IOLBF, 0);
- setvbuf(infile, NULL, _IOLBF, 0);
-#else
setlinebuf(stdout);
setlinebuf(infile);
-#endif
interactive = !batchmode && isatty(STDIN_FILENO);
err = 0;