1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-28 01:41:48 +03:00

Fixed build warnings of the scp example.

This commit is contained in:
Andreas Schneider
2010-03-29 22:46:03 +02:00
parent 32ac1e04ec
commit 6e82193175

View File

@ -72,7 +72,10 @@ static void create_files(ssh_session session){
}
while(!channel_is_eof(channel)){
channel_read(channel,buffer,1,1);
write(1,buffer,1);
if (write(1,buffer,1) < 0) {
fprintf(stderr, "Error writing to buffer\n");
return;
}
}
channel_close(channel);
channel_free(channel);