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

buffer: Apply coding style to ssh_buffer_reinit()

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-04-18 10:21:40 +02:00
parent 6f1f8d2bdb
commit 87b8d232bd

View File

@@ -192,17 +192,19 @@ static void buffer_shift(ssh_buffer buffer){
*/
int ssh_buffer_reinit(struct ssh_buffer_struct *buffer)
{
buffer_verify(buffer);
explicit_bzero(buffer->data, buffer->used);
buffer->used = 0;
buffer->pos = 0;
if(buffer->allocated > 127) {
if (realloc_buffer(buffer, 127) < 0) {
return -1;
buffer_verify(buffer);
explicit_bzero(buffer->data, buffer->used);
buffer->used = 0;
buffer->pos = 0;
if (buffer->allocated > 127) {
if (realloc_buffer(buffer, 127) < 0) {
return -1;
}
}
}
buffer_verify(buffer);
return 0;
buffer_verify(buffer);
return 0;
}
/**