aboutsummaryrefslogtreecommitdiff
path: root/src/agent.c
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2015-09-25 00:34:42 +0200
committerFabiano FidĂȘncio <fidencio@redhat.com>2016-01-19 11:31:08 +0100
commit05fd0acf457f6514f4dff4d6d2d3906776a76437 (patch)
treebf60c88a30f7a7feb2026d6034f7697682c77d94 /src/agent.c
parent25707e97520c7787f0a742dea419afca4c8cad41 (diff)
downloadlibssh-05fd0acf457f6514f4dff4d6d2d3906776a76437.tar.gz
libssh-05fd0acf457f6514f4dff4d6d2d3906776a76437.tar.xz
libssh-05fd0acf457f6514f4dff4d6d2d3906776a76437.zip
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>
Diffstat (limited to 'src/agent.c')
-rw-r--r--src/agent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/agent.c b/src/agent.c
index edd4cd34..76265645 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -273,7 +273,7 @@ static int agent_talk(struct ssh_session_struct *session,
uint32_t len = 0;
uint8_t payload[1024] = {0};
- len = ssh_buffer_get_rest_len(request);
+ len = ssh_buffer_get_len(request);
SSH_LOG(SSH_LOG_TRACE, "Request length: %u", len);
agent_put_u32(payload, len);
@@ -541,7 +541,7 @@ ssh_string ssh_agent_sign_data(ssh_session session,
}
/* Add data */
- dlen = ssh_buffer_get_rest_len(data);
+ dlen = ssh_buffer_get_len(data);
if (ssh_buffer_add_u32(request, htonl(dlen)) < 0) {
ssh_buffer_free(request);
return NULL;