From 87b8d232bd52ad7b89ecb361641427ec3dbdef38 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 18 Apr 2018 10:21:40 +0200 Subject: [PATCH] buffer: Apply coding style to ssh_buffer_reinit() Signed-off-by: Andreas Schneider --- src/buffer.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 4c59975b..205aa333 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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; } /**