diff options
author | Fabiano FidĂȘncio <fidencio@redhat.com> | 2015-09-25 01:25:56 +0200 |
---|---|---|
committer | Fabiano FidĂȘncio <fidencio@redhat.com> | 2016-01-19 11:31:08 +0100 |
commit | d1d003c23226dc429327fd473f829544c1e3636a (patch) | |
tree | 6e075f3686c3d67327c440b30535dac525e905dc /examples | |
parent | 3cf72e52586ab1ebff360d9b4f989ef15abfefa6 (diff) | |
download | libssh-d1d003c23226dc429327fd473f829544c1e3636a.tar.gz libssh-d1d003c23226dc429327fd473f829544c1e3636a.tar.xz libssh-d1d003c23226dc429327fd473f829544c1e3636a.zip |
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>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/sample.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/sample.c b/examples/sample.c index b716a1b0..247004e9 100644 --- a/examples/sample.c +++ b/examples/sample.c @@ -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; } |