aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2012-10-07 10:56:10 +0200
committerAndreas Schneider <asn@cryptomilk.org>2012-10-07 10:56:10 +0200
commitc078e36219fc23aed8fff9b5efce33e09e177e20 (patch)
tree7f538d5c42e101b56c9ba6724b217d5c5758e3b8 /examples
parentc5782b7486060b170bea36110a2dab77ec1545dc (diff)
downloadlibssh-c078e36219fc23aed8fff9b5efce33e09e177e20.tar.gz
libssh-c078e36219fc23aed8fff9b5efce33e09e177e20.tar.xz
libssh-c078e36219fc23aed8fff9b5efce33e09e177e20.zip
example: Fix a build warning.
Diffstat (limited to 'examples')
-rw-r--r--examples/samplesshd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/samplesshd.c b/examples/samplesshd.c
index c5a0ef0c..f9e0dc8c 100644
--- a/examples/samplesshd.c
+++ b/examples/samplesshd.c
@@ -295,7 +295,10 @@ int main(int argc, char **argv){
return 1;
}
if (buf[0] == '\x0d') {
- write(1, "\n", 1);
+ if (write(1, "\n", 1) < 0) {
+ printf("error writing to buffer\n");
+ return 1;
+ }
ssh_channel_write(chan, "\n", 1);
}
}