summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormillert@openbsd.org <millert@openbsd.org>2014-11-26 18:34:51 +0000
committerDamien Miller <djm@mindrot.org>2014-12-05 09:28:50 +1100
commitdb995f2eed5fc432598626fa3e30654503bf7151 (patch)
treed86efcd4ad4cc18a12d5eb1bd7ec04af9a48a345
parent72bba3d179ced8b425272efe6956a309202a91f3 (diff)
upstream commit
Prefer setvbuf() to setlinebuf() for portability; ok deraadt@
-rw-r--r--sftp.c6
-rw-r--r--ssh-add.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/sftp.c b/sftp.c
index e86bb3b18..98a146ed4 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.167 2014/10/06 00:47:15 djm Exp $ */ 1/* $OpenBSD: sftp.c,v 1.168 2014/11/26 18:34:51 millert Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -2084,8 +2084,8 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
2084 free(dir); 2084 free(dir);
2085 } 2085 }
2086 2086
2087 setlinebuf(stdout); 2087 setvbuf(stdout, NULL, _IOLBF, 0);
2088 setlinebuf(infile); 2088 setvbuf(infile, NULL, _IOLBF, 0);
2089 2089
2090 interactive = !batchmode && isatty(STDIN_FILENO); 2090 interactive = !batchmode && isatty(STDIN_FILENO);
2091 err = 0; 2091 err = 0;
diff --git a/ssh-add.c b/ssh-add.c
index 78a3359ad..ba11aa150 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-add.c,v 1.113 2014/07/09 14:15:56 benno Exp $ */ 1/* $OpenBSD: ssh-add.c,v 1.114 2014/11/26 18:34:51 millert Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -437,7 +437,7 @@ main(int argc, char **argv)
437 437
438 OpenSSL_add_all_algorithms(); 438 OpenSSL_add_all_algorithms();
439 439
440 setlinebuf(stdout); 440 setvbuf(stdout, NULL, _IOLBF, 0);
441 441
442 /* At first, get a connection to the authentication agent. */ 442 /* At first, get a connection to the authentication agent. */
443 ac = ssh_get_authentication_connection(); 443 ac = ssh_get_authentication_connection();