code style

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
diff --git a/library/cipher.c b/library/cipher.c
index 3ed9aef..f6d0fce 100644
--- a/library/cipher.c
+++ b/library/cipher.c
@@ -67,7 +67,9 @@
 
 static int supported_init = 0;
 
-static inline const mbedtls_cipher_base_t* mbedtls_cipher_get_base(const mbedtls_cipher_info_t *info) {
+static inline const mbedtls_cipher_base_t *mbedtls_cipher_get_base(
+    const mbedtls_cipher_info_t *info)
+{
     return mbedtls_cipher_base_lookup_table[info->base_idx];
 }
 
@@ -342,12 +344,12 @@
         MBEDTLS_MODE_OFB == ctx->cipher_info->mode ||
         MBEDTLS_MODE_CTR == ctx->cipher_info->mode) {
         return mbedtls_cipher_get_base(ctx->cipher_info)->setkey_enc_func(ctx->cipher_ctx, key,
-                                                       ctx->key_bitlen);
+                                                                          ctx->key_bitlen);
     }
 
     if (MBEDTLS_DECRYPT == operation) {
         return mbedtls_cipher_get_base(ctx->cipher_info)->setkey_dec_func(ctx->cipher_ctx, key,
-                                                       ctx->key_bitlen);
+                                                                          ctx->key_bitlen);
     }
 
     return MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA;
@@ -553,7 +555,8 @@
         *olen = ilen;
 
         if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->ecb_func(ctx->cipher_ctx,
-                                                         ctx->operation, input, output))) {
+                                                                            ctx->operation, input,
+                                                                            output))) {
             return ret;
         }
 
@@ -619,8 +622,11 @@
                    copy_len);
 
             if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cbc_func(ctx->cipher_ctx,
-                                                             ctx->operation, block_size, ctx->iv,
-                                                             ctx->unprocessed_data, output))) {
+                                                                                ctx->operation,
+                                                                                block_size, ctx->iv,
+                                                                                ctx->
+                                                                                unprocessed_data,
+                                                                                output))) {
                 return ret;
             }
 
@@ -659,8 +665,10 @@
          */
         if (ilen) {
             if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cbc_func(ctx->cipher_ctx,
-                                                             ctx->operation, ilen, ctx->iv, input,
-                                                             output))) {
+                                                                                ctx->operation,
+                                                                                ilen, ctx->iv,
+                                                                                input,
+                                                                                output))) {
                 return ret;
             }
 
@@ -674,9 +682,10 @@
 #if defined(MBEDTLS_CIPHER_MODE_CFB)
     if (ctx->cipher_info->mode == MBEDTLS_MODE_CFB) {
         if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cfb_func(ctx->cipher_ctx,
-                                                         ctx->operation, ilen,
-                                                         &ctx->unprocessed_len, ctx->iv,
-                                                         input, output))) {
+                                                                            ctx->operation, ilen,
+                                                                            &ctx->unprocessed_len,
+                                                                            ctx->iv,
+                                                                            input, output))) {
             return ret;
         }
 
@@ -689,8 +698,10 @@
 #if defined(MBEDTLS_CIPHER_MODE_OFB)
     if (ctx->cipher_info->mode == MBEDTLS_MODE_OFB) {
         if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->ofb_func(ctx->cipher_ctx,
-                                                         ilen, &ctx->unprocessed_len, ctx->iv,
-                                                         input, output))) {
+                                                                            ilen,
+                                                                            &ctx->unprocessed_len,
+                                                                            ctx->iv,
+                                                                            input, output))) {
             return ret;
         }
 
@@ -703,8 +714,11 @@
 #if defined(MBEDTLS_CIPHER_MODE_CTR)
     if (ctx->cipher_info->mode == MBEDTLS_MODE_CTR) {
         if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->ctr_func(ctx->cipher_ctx,
-                                                         ilen, &ctx->unprocessed_len, ctx->iv,
-                                                         ctx->unprocessed_data, input, output))) {
+                                                                            ilen,
+                                                                            &ctx->unprocessed_len,
+                                                                            ctx->iv,
+                                                                            ctx->unprocessed_data,
+                                                                            input, output))) {
             return ret;
         }
 
@@ -722,7 +736,11 @@
         }
 
         ret = mbedtls_cipher_get_base(ctx->cipher_info)->xts_func(ctx->cipher_ctx,
-                                               ctx->operation, ilen, ctx->iv, input, output);
+                                                                  ctx->operation,
+                                                                  ilen,
+                                                                  ctx->iv,
+                                                                  input,
+                                                                  output);
         if (ret != 0) {
             return ret;
         }
@@ -736,7 +754,8 @@
 #if defined(MBEDTLS_CIPHER_MODE_STREAM)
     if (ctx->cipher_info->mode == MBEDTLS_MODE_STREAM) {
         if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->stream_func(ctx->cipher_ctx,
-                                                            ilen, input, output))) {
+                                                                               ilen, input,
+                                                                               output))) {
             return ret;
         }
 
@@ -1001,10 +1020,12 @@
 
         /* cipher block */
         if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cbc_func(ctx->cipher_ctx,
-                                                         ctx->operation,
-                                                         mbedtls_cipher_get_block_size(ctx),
-                                                         ctx->iv,
-                                                         ctx->unprocessed_data, output))) {
+                                                                            ctx->operation,
+                                                                            mbedtls_cipher_get_block_size(
+                                                                                ctx),
+                                                                            ctx->iv,
+                                                                            ctx->unprocessed_data,
+                                                                            output))) {
             return ret;
         }
 
diff --git a/library/cipher_wrap.c b/library/cipher_wrap.c
index 0bb9c02..7c6c9d3 100644
--- a/library/cipher_wrap.c
+++ b/library/cipher_wrap.c
@@ -2295,7 +2295,7 @@
                      sizeof(mbedtls_cipher_definitions[0]))
 int mbedtls_cipher_supported[NUM_CIPHERS];
 
-const mbedtls_cipher_base_t* mbedtls_cipher_base_lookup_table[] = {
+const mbedtls_cipher_base_t *mbedtls_cipher_base_lookup_table[] = {
 #if defined(MBEDTLS_AES_C)
     &aes_info,
 #else
diff --git a/library/cipher_wrap.h b/library/cipher_wrap.h
index 06c8108..c85a4ef 100644
--- a/library/cipher_wrap.h
+++ b/library/cipher_wrap.h
@@ -135,7 +135,7 @@
 
 extern int mbedtls_cipher_supported[];
 
-extern const mbedtls_cipher_base_t * mbedtls_cipher_base_lookup_table[];
+extern const mbedtls_cipher_base_t *mbedtls_cipher_base_lookup_table[];
 
 #ifdef __cplusplus
 }
diff --git a/library/pkcs12.c b/library/pkcs12.c
index 8540de2..1dbdb02 100644
--- a/library/pkcs12.c
+++ b/library/pkcs12.c
@@ -171,7 +171,9 @@
         goto exit;
     }
 
-    if ((ret = mbedtls_cipher_set_iv(&cipher_ctx, iv, mbedtls_cipher_info_get_iv_size(cipher_info))) != 0) {
+    if ((ret =
+             mbedtls_cipher_set_iv(&cipher_ctx, iv,
+                                   mbedtls_cipher_info_get_iv_size(cipher_info))) != 0) {
         goto exit;
     }