diff options
author | Andreas Schneider <mail@cynapses.org> | 2010-03-29 22:47:22 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2010-03-29 22:47:22 +0200 |
commit | 1a894b65d44c5c30bcfa8bcf5d913ffd7323bbd5 (patch) | |
tree | 7b891e60b229d7db9dec1d6ea3db8be0df9a1422 /examples/samplesshd.c | |
parent | 6e82193175243d7c41ac4bf5ea6b49a2f90187e5 (diff) | |
download | libssh-1a894b65d44c5c30bcfa8bcf5d913ffd7323bbd5.tar.gz libssh-1a894b65d44c5c30bcfa8bcf5d913ffd7323bbd5.tar.xz libssh-1a894b65d44c5c30bcfa8bcf5d913ffd7323bbd5.zip |
Fixed build warning in the sshd example.
Diffstat (limited to 'examples/samplesshd.c')
-rw-r--r-- | examples/samplesshd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/samplesshd.c b/examples/samplesshd.c index e9d00236..cd8127f9 100644 --- a/examples/samplesshd.c +++ b/examples/samplesshd.c @@ -258,7 +258,10 @@ int main(int argc, char **argv){ do{ i=channel_read_buffer(chan,buf,0,0); if(i>0) - write(1,buffer_get(buf),buffer_get_len(buf)); + if (write(1,buffer_get(buf),buffer_get_len(buf)) < 0) { + printf("error writint to buffer\n"); + return 1; + } } while (i>0); buffer_free(buf); ssh_disconnect(session); |