aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
}