mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-07 08:02:55 +03:00
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 fa9fbb1d67
)
This commit is contained in:
committed by
Andreas Schneider
parent
64233fa3bb
commit
eb98a780ed
@@ -56,7 +56,7 @@ If an error has been encountered, it returns a negative value:
|
|||||||
|
|
||||||
@code
|
@code
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
unsigned int nbytes;
|
int nbytes;
|
||||||
|
|
||||||
nbytes = ssh_channel_read(channel, buffer, sizeof(buffer), 0);
|
nbytes = ssh_channel_read(channel, buffer, sizeof(buffer), 0);
|
||||||
while (nbytes > 0)
|
while (nbytes > 0)
|
||||||
|
@@ -367,7 +367,7 @@ int show_remote_processes(ssh_session session)
|
|||||||
ssh_channel channel;
|
ssh_channel channel;
|
||||||
int rc;
|
int rc;
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
unsigned int nbytes;
|
int nbytes;
|
||||||
|
|
||||||
channel = ssh_channel_new(session);
|
channel = ssh_channel_new(session);
|
||||||
if (channel == NULL)
|
if (channel == NULL)
|
||||||
@@ -391,7 +391,7 @@ int show_remote_processes(ssh_session session)
|
|||||||
nbytes = ssh_channel_read(channel, buffer, sizeof(buffer), 0);
|
nbytes = ssh_channel_read(channel, buffer, sizeof(buffer), 0);
|
||||||
while (nbytes > 0)
|
while (nbytes > 0)
|
||||||
{
|
{
|
||||||
if (write(1, buffer, nbytes) != nbytes)
|
if (write(1, buffer, nbytes) != (unsigned int) nbytes)
|
||||||
{
|
{
|
||||||
ssh_channel_close(channel);
|
ssh_channel_close(channel);
|
||||||
ssh_channel_free(channel);
|
ssh_channel_free(channel);
|
||||||
|
Reference in New Issue
Block a user