summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2012-09-06 23:20:10 +0100
committerColin Watson <cjwatson@debian.org>2012-09-06 23:20:10 +0100
commitc6a2c0334e45419875687d250aed9bea78480f2e (patch)
treed8f01bef9f3921fa1ca7592a19474be9c8349f76 /sftp.c
parentdd5ed53e20d218607260916a6b04d1c8c5b3d88f (diff)
parent8b13b5bdc4f19bd52ee673104d66b71c21153b96 (diff)
merge 6.1p1
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sftp.c b/sftp.c
index da7fbab38..235c6ad04 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.134 2011/11/16 12:24:28 oga Exp $ */ 1/* $OpenBSD: sftp.c,v 1.136 2012/06/22 14:36:33 dtucker 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 *
@@ -783,7 +783,6 @@ static int
783do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path, 783do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
784 int lflag) 784 int lflag)
785{ 785{
786 Attrib *a = NULL;
787 char *fname, *lname; 786 char *fname, *lname;
788 glob_t g; 787 glob_t g;
789 int err; 788 int err;
@@ -829,7 +828,7 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
829 colspace = width / columns; 828 colspace = width / columns;
830 } 829 }
831 830
832 for (i = 0; g.gl_pathv[i] && !interrupted; i++, a = NULL) { 831 for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
833 fname = path_strip(g.gl_pathv[i], strip_path); 832 fname = path_strip(g.gl_pathv[i], strip_path);
834 if (lflag & LS_LONG_VIEW) { 833 if (lflag & LS_LONG_VIEW) {
835 if (g.gl_statv[i] == NULL) { 834 if (g.gl_statv[i] == NULL) {
@@ -1934,13 +1933,8 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
1934 xfree(dir); 1933 xfree(dir);
1935 } 1934 }
1936 1935
1937#if defined(HAVE_SETVBUF) && !defined(BROKEN_SETVBUF)
1938 setvbuf(stdout, NULL, _IOLBF, 0);
1939 setvbuf(infile, NULL, _IOLBF, 0);
1940#else
1941 setlinebuf(stdout); 1936 setlinebuf(stdout);
1942 setlinebuf(infile); 1937 setlinebuf(infile);
1943#endif
1944 1938
1945 interactive = !batchmode && isatty(STDIN_FILENO); 1939 interactive = !batchmode && isatty(STDIN_FILENO);
1946 err = 0; 1940 err = 0;