sftp_write_sliding.c: indent fix

Use the standard indenting and removed CVS leftover comment
This commit is contained in:
Daniel Stenberg 2011-05-10 10:17:32 +02:00
parent 5b66a5f38d
commit 59673a111e

View File

@ -1,6 +1,4 @@
/* /*
* $Id: sftp_write_nonblock.c,v 1.14 2009/04/28 10:35:30 bagder Exp $
*
* Sample showing how to do SFTP non-blocking write transfers. * Sample showing how to do SFTP non-blocking write transfers.
* *
* The sample code has default values for host name, user name, password * The sample code has default values for host name, user name, password
@ -249,19 +247,19 @@ int main(int argc, char *argv[])
/* write data in a loop until we block */ /* write data in a loop until we block */
while ((rc = libssh2_sftp_write(sftp_handle, mem, memuse)) == while ((rc = libssh2_sftp_write(sftp_handle, mem, memuse)) ==
LIBSSH2_ERROR_EAGAIN) { LIBSSH2_ERROR_EAGAIN) {
waitsocket(sock, session); waitsocket(sock, session);
} }
if(rc < 0) if(rc < 0)
break; break;
if(memuse - rc) { if(memuse - rc) {
/* make room for more data at the end of the buffer */ /* make room for more data at the end of the buffer */
memmove(&mem[0], &mem[rc], memuse - rc); memmove(&mem[0], &mem[rc], memuse - rc);
memuse -= rc; memuse -= rc;
} }
else else
/* 'mem' was consumed fully */ /* 'mem' was consumed fully */
memuse = 0; memuse = 0;
} while (rc > 0); } while (rc > 0);