aboutsummaryrefslogtreecommitdiff
path: root/examples/sshnetcat.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-11-27 20:16:09 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-11-27 20:16:09 +0100
commitd61fcbf7b2058ffc5cb56a0e800843e34d83f3ba (patch)
tree2dd1564c8bb420afeb4469c411fc88c97d7f9b72 /examples/sshnetcat.c
parent75e61f498b88cc642babbbb42fc96d1a179de763 (diff)
downloadlibssh-d61fcbf7b2058ffc5cb56a0e800843e34d83f3ba.tar.gz
libssh-d61fcbf7b2058ffc5cb56a0e800843e34d83f3ba.tar.xz
libssh-d61fcbf7b2058ffc5cb56a0e800843e34d83f3ba.zip
examples: Fix else branch.
CID #1127816
Diffstat (limited to 'examples/sshnetcat.c')
-rw-r--r--examples/sshnetcat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/sshnetcat.c b/examples/sshnetcat.c
index 052cabf4..67bb1ad6 100644
--- a/examples/sshnetcat.c
+++ b/examples/sshnetcat.c
@@ -143,13 +143,14 @@ static void select_loop(ssh_session session,ssh_channel channel){
if(lus==0){
channel_free(channel);
channel=channels[0]=NULL;
- } else
+ } else {
ret = write(2, buffer, lus);
if (ret < 0) {
fprintf(stderr, "Error writing to stderr: %s",
strerror(errno));
return;
}
+ }
}
}
if(channel && channel_is_closed(channel)){