[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] wrapper: fix 4-space indentation in ssh_cipher_clear


From 263a62ed52ed757b93a55aa76f89b08a61bc4a3d Mon Sep 17 00:00:00 2001
From: Jon Simons <jon@xxxxxxxxxxxxx>
Date: Fri, 14 Jul 2017 15:31:10 -0400
Subject: [PATCH 1/3] wrapper: fix 4-space indentation in ssh_cipher_clear

Signed-off-by: Jon Simons <jon@xxxxxxxxxxxxx>
---
 src/wrapper.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/wrapper.c b/src/wrapper.c
index 877b807b..60dc9fd1 100644
--- a/src/wrapper.c
+++ b/src/wrapper.c
@@ -105,29 +105,29 @@ static struct ssh_cipher_struct *cipher_new(int offset) {
 
 void ssh_cipher_clear(struct ssh_cipher_struct *cipher){
 #ifdef HAVE_LIBGCRYPT
-  unsigned int i;
+    unsigned int i;
 #endif
 
-  if (cipher == NULL) {
-    return;
-  }
+    if (cipher == NULL) {
+        return;
+    }
 
 #ifdef HAVE_LIBGCRYPT
-  if(cipher->key) {
-    for (i = 0; i < (cipher->keylen / sizeof(gcry_cipher_hd_t)); i++) {
-      gcry_cipher_close(cipher->key[i]);
+    if (cipher->key) {
+        for (i = 0; i < (cipher->keylen / sizeof(gcry_cipher_hd_t)); i++) {
+            gcry_cipher_close(cipher->key[i]);
+        }
+        SAFE_FREE(cipher->key);
     }
-    SAFE_FREE(cipher->key);
-  }
 #endif
-  if (cipher->ctx != NULL) {
-    if (cipher->cleanup != NULL) {
-      cipher->cleanup(cipher);
-    }
+    if (cipher->ctx != NULL) {
+        if (cipher->cleanup != NULL) {
+            cipher->cleanup(cipher);
+        }
 #ifdef HAVE_LIBCRYPTO
-    EVP_CIPHER_CTX_free(cipher->ctx);
+        EVP_CIPHER_CTX_free(cipher->ctx);
 #endif
-  }
+    }
 }
 
 static void cipher_free(struct ssh_cipher_struct *cipher) {
-- 
2.13.2


Archive administrator: postmaster@lists.cynapses.org