aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-04-18 10:21:40 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-04-18 10:22:03 +0200
commit87b8d232bd52ad7b89ecb361641427ec3dbdef38 (patch)
tree5df291bfe5834607f53bef1827d714bc3cc4546d
parent6f1f8d2bdbe4fd472408c7981073a0e944e18801 (diff)
downloadlibssh-87b8d232bd52ad7b89ecb361641427ec3dbdef38.tar.gz
libssh-87b8d232bd52ad7b89ecb361641427ec3dbdef38.tar.xz
libssh-87b8d232bd52ad7b89ecb361641427ec3dbdef38.zip
buffer: Apply coding style to ssh_buffer_reinit()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/buffer.c22
1 files 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;
}
/**