diff options
author | Fabiano FidĂȘncio <fidencio@redhat.com> | 2015-09-25 00:34:42 +0200 |
---|---|---|
committer | Fabiano FidĂȘncio <fidencio@redhat.com> | 2016-01-19 11:31:08 +0100 |
commit | 05fd0acf457f6514f4dff4d6d2d3906776a76437 (patch) | |
tree | bf60c88a30f7a7feb2026d6034f7697682c77d94 /src/pcap.c | |
parent | 25707e97520c7787f0a742dea419afca4c8cad41 (diff) | |
download | libssh-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/pcap.c')
-rw-r--r-- | src/pcap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -144,7 +144,7 @@ static int ssh_pcap_file_write(ssh_pcap_file pcap, ssh_buffer packet){ uint32_t len; if(pcap == NULL || pcap->output==NULL) return SSH_ERROR; - len=ssh_buffer_get_rest_len(packet); + len=ssh_buffer_get_len(packet); err=fwrite(ssh_buffer_get(packet),len,1,pcap->output); if(err<0) return SSH_ERROR; @@ -171,7 +171,7 @@ int ssh_pcap_file_write_packet(ssh_pcap_file pcap, ssh_buffer packet, uint32_t o if (err < 0) { goto error; } - err = ssh_buffer_add_u32(header,htonl(ssh_buffer_get_rest_len(packet))); + err = ssh_buffer_add_u32(header,htonl(ssh_buffer_get_len(packet))); if (err < 0) { goto error; } |