summaryrefslogtreecommitdiff
path: root/sftp-client.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-12-21 14:45:46 +1100
committerDamien Miller <djm@mindrot.org>2001-12-21 14:45:46 +1100
commit9f0f5c64bc4b6144e3fed6a7f538f7c21819a492 (patch)
treef79317ab211f59181a61b526f566e9c8cfe70c73 /sftp-client.c
parent89681214ca2f50a1b1ed6164c3afe1ce14995ffc (diff)
- deraadt@cvs.openbsd.org 2001/12/19 07:18:56
[auth1.c auth2.c auth2-chall.c auth-bsdauth.c auth.c authfile.c auth.h] [auth-krb4.c auth-rhosts.c auth-skey.c bufaux.c canohost.c channels.c] [cipher.c clientloop.c compat.c compress.c deattack.c key.c log.c mac.c] [match.c misc.c nchan.c packet.c readconf.c rijndael.c rijndael.h scard.c] [servconf.c servconf.h serverloop.c session.c sftp.c sftp-client.c] [sftp-glob.c sftp-int.c sftp-server.c ssh-add.c ssh-agent.c ssh.c] [sshconnect1.c sshconnect2.c sshconnect.c sshd.8 sshd.c sshd_config] [ssh-keygen.c sshlogin.c sshpty.c sshtty.c ttymodes.c uidswap.c] basic KNF done while i was looking for something else
Diffstat (limited to 'sftp-client.c')
-rw-r--r--sftp-client.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sftp-client.c b/sftp-client.c
index 4f2a1e28..ca5a4859 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -29,7 +29,7 @@
/* XXX: copy between two remote sites */
#include "includes.h"
-RCSID("$OpenBSD: sftp-client.c,v 1.18 2001/07/14 15:10:16 stevesk Exp $");
+RCSID("$OpenBSD: sftp-client.c,v 1.19 2001/12/19 07:18:56 deraadt Exp $");
#include "buffer.h"
#include "bufaux.h"
@@ -308,9 +308,8 @@ do_lsreaddir(int fd_in, int fd_out, char *path, int printflag,
*dir = xmalloc(sizeof(**dir));
(*dir)[0] = NULL;
}
-
- for(;;) {
+ for (;;) {
int count;
id = expected_id = msg_id++;
@@ -356,7 +355,7 @@ do_lsreaddir(int fd_in, int fd_out, char *path, int printflag,
if (count == 0)
break;
debug3("Received %d SSH2_FXP_NAME responses", count);
- for(i = 0; i < count; i++) {
+ for (i = 0; i < count; i++) {
char *filename, *longname;
Attrib *a;
@@ -404,8 +403,8 @@ do_readdir(int fd_in, int fd_out, char *path, SFTP_DIRENT ***dir)
void free_sftp_dirents(SFTP_DIRENT **s)
{
int i;
-
- for(i = 0; s[i]; i++) {
+
+ for (i = 0; s[i]; i++) {
xfree(s[i]->filename);
xfree(s[i]->longname);
xfree(s[i]);
@@ -726,7 +725,7 @@ do_download(int fd_in, int fd_out, char *remote_path, char *local_path,
/* Read from remote and write to local */
offset = 0;
- for(;;) {
+ for (;;) {
u_int len;
char *data;
@@ -758,7 +757,7 @@ do_download(int fd_in, int fd_out, char *remote_path, char *local_path,
else {
error("Couldn't read from remote "
"file \"%s\" : %s", remote_path,
- fx2txt(status));
+ fx2txt(status));
do_close(fd_in, fd_out, handle, handle_len);
goto done;
}
@@ -868,7 +867,7 @@ do_upload(int fd_in, int fd_out, char *local_path, char *remote_path,
/* Read from local and write to remote */
offset = 0;
- for(;;) {
+ for (;;) {
int len;
char data[COPY_SIZE];