1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

buffer: do not use ssh_buffer_get_rest_len()

As ssh_buffer_get_len() actually calls ssh_buffer_get_rest_len(), let's
just use the first one. This is a preparatory step for removing
ssh_buffer_get_rest_len().

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 00:34:42 +02:00
parent 25707e9752
commit 05fd0acf45
19 changed files with 94 additions and 94 deletions

View File

@@ -426,7 +426,7 @@ int ssh_buffer_add_buffer(struct ssh_buffer_struct *buffer,
rc = ssh_buffer_add_data(buffer,
ssh_buffer_get(source),
ssh_buffer_get_rest_len(source));
ssh_buffer_get_len(source));
if (rc < 0) {
return -1;
}
@@ -460,7 +460,7 @@ void *ssh_buffer_get_begin(struct ssh_buffer_struct *buffer){
*
* @return A pointer to the data from current position.
*
* @see ssh_buffer_get_rest_len()
* @see ssh_buffer_get_len()
*/
void *ssh_buffer_get(struct ssh_buffer_struct *buffer){
return buffer->data + buffer->pos;