diff options
author | Andreas Schneider <mail@cynapses.org> | 2010-03-29 22:38:21 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2010-03-29 22:38:21 +0200 |
commit | d07aef725e05f02e34d89bce8543a975052f4a6d (patch) | |
tree | 696fe396c0e2633e9e96e86b5055aaf668f3e1c0 /examples/exec.c | |
parent | b5eb08ad09abe726d5c973f8437ab60b1190b258 (diff) | |
download | libssh-d07aef725e05f02e34d89bce8543a975052f4a6d.tar.gz libssh-d07aef725e05f02e34d89bce8543a975052f4a6d.tar.xz libssh-d07aef725e05f02e34d89bce8543a975052f4a6d.zip |
Fixed build warnings in the exec example.
Diffstat (limited to 'examples/exec.c')
-rw-r--r-- | examples/exec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/exec.c b/examples/exec.c index e2c2cd1..bff49fd 100644 --- a/examples/exec.c +++ b/examples/exec.c @@ -37,7 +37,9 @@ int main(void) { while ((rc = channel_read(channel, buffer, sizeof(buffer), 0)) > 0) { - fwrite(buffer, 1, rc, stdout); + if (fwrite(buffer, 1, rc, stdout) != (unsigned int) rc) { + return 1; + } } if (rc < 0) { |