1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

buffer: use ssh_buffer_get() instead of ssh_buffer_get_begin()

This commit is a preparatory stage for removing ssh_buffer_get_begin().
Note that removing ssh_buffer_get_begin() doesn't break API
compatibility, as this functions has never been exposed (it only has the
LIBSSH_API prefix).

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Fabiano Fidêncio
2015-09-25 01:25:56 +02:00
parent 3cf72e5258
commit d1d003c232
9 changed files with 27 additions and 27 deletions

View File

@ -252,7 +252,7 @@ static void select_loop(ssh_session session,ssh_channel channel){
ssh_channel_free(channel);
channel=channels[0]=NULL;
} else
if (write(1,ssh_buffer_get_begin(readbuf),lus) < 0) {
if (write(1,ssh_buffer_get(readbuf),lus) < 0) {
fprintf(stderr, "Error writing to buffer\n");
return;
}
@ -268,7 +268,7 @@ static void select_loop(ssh_session session,ssh_channel channel){
ssh_channel_free(channel);
channel=channels[0]=NULL;
} else
if (write(2,ssh_buffer_get_begin(readbuf),lus) < 0) {
if (write(2,ssh_buffer_get(readbuf),lus) < 0) {
fprintf(stderr, "Error writing to buffer\n");
return;
}