Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

doc: Use fwrite for the command example.

  • Loading branch information...
commit 8078d4f674f311e31af68e8d87f6ba2755f13ece 1 parent ac785e0
@gladiac gladiac authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 doc/command.dox
View
4 doc/command.dox
@@ -61,7 +61,7 @@ If an error has been encountered, it returns a negative value:
nbytes = ssh_channel_read(channel, buffer, sizeof(buffer), 0);
while (nbytes > 0)
{
- if (write(1, buffer, nbytes) != nbytes)
+ if (fwrite(buffer, 1, nbytes, stdout) != nbytes)
{
ssh_channel_close(channel);
ssh_channel_free(channel);
@@ -69,7 +69,7 @@ If an error has been encountered, it returns a negative value:
}
nbytes = ssh_channel_read(channel, buffer, sizeof(buffer), 0);
}
-
+
if (nbytes < 0)
{
ssh_channel_close(channel);
Please sign in to comment.
Something went wrong with that request. Please try again.