summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordy Moos <jordy@pbwebmedia.com>2015-06-12 15:16:43 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-06-24 18:36:08 +0200
commiteb98a780ed11cf83d2265a8a57c07419516c54de (patch)
treee45bae79fc8977a7f78482e07a37ec2f436e29c5
parent64233fa3bbedd338c216136babafdbfc68b094bb (diff)
downloadlibssh-eb98a780ed11cf83d2265a8a57c07419516c54de.tar.gz
libssh-eb98a780ed11cf83d2265a8a57c07419516c54de.tar.xz
libssh-eb98a780ed11cf83d2265a8a57c07419516c54de.zip
Documentation fix where unsigned is used where signed is expected
Signed-off-by: Jordy Moos <jordymoos@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit fa9fbb1d670e1ee99ba8c5255c2d80ac699496e4)
-rw-r--r--doc/command.dox2
-rw-r--r--doc/guided_tour.dox4
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/command.dox b/doc/command.dox
index 76113543..588151c6 100644
--- a/doc/command.dox
+++ b/doc/command.dox
@@ -56,7 +56,7 @@ If an error has been encountered, it returns a negative value:
@code
char buffer[256];
- unsigned int nbytes;
+ int nbytes;
nbytes = ssh_channel_read(channel, buffer, sizeof(buffer), 0);
while (nbytes > 0)
diff --git a/doc/guided_tour.dox b/doc/guided_tour.dox
index ecd637e1..94449e19 100644
--- a/doc/guided_tour.dox
+++ b/doc/guided_tour.dox
@@ -367,7 +367,7 @@ int show_remote_processes(ssh_session session)
ssh_channel channel;
int rc;
char buffer[256];
- unsigned int nbytes;
+ int nbytes;
channel = ssh_channel_new(session);
if (channel == NULL)
@@ -391,7 +391,7 @@ int show_remote_processes(ssh_session session)
nbytes = ssh_channel_read(channel, buffer, sizeof(buffer), 0);
while (nbytes > 0)
{
- if (write(1, buffer, nbytes) != nbytes)
+ if (write(1, buffer, nbytes) != (unsigned int) nbytes)
{
ssh_channel_close(channel);
ssh_channel_free(channel);