1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +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

@@ -1034,12 +1034,12 @@ ssh_string pki_publickey_to_blob(const ssh_key key)
goto fail;
}
str = ssh_string_new(ssh_buffer_get_rest_len(buffer));
str = ssh_string_new(ssh_buffer_get_len(buffer));
if (str == NULL) {
goto fail;
}
rc = ssh_string_fill(str, ssh_buffer_get(buffer), ssh_buffer_get_rest_len(buffer));
rc = ssh_string_fill(str, ssh_buffer_get(buffer), ssh_buffer_get_len(buffer));
if (rc < 0) {
goto fail;
}
@@ -1238,13 +1238,13 @@ ssh_string pki_signature_to_blob(const ssh_signature sig)
return NULL;
}
sig_blob = ssh_string_new(ssh_buffer_get_rest_len(b));
sig_blob = ssh_string_new(ssh_buffer_get_len(b));
if (sig_blob == NULL) {
ssh_buffer_free(b);
return NULL;
}
ssh_string_fill(sig_blob, ssh_buffer_get(b), ssh_buffer_get_rest_len(b));
ssh_string_fill(sig_blob, ssh_buffer_get(b), ssh_buffer_get_len(b));
ssh_buffer_free(b);
break;
}