]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - bcal/bcal-basic.c
fixing style, typos and uart
[avr-crypto-lib.git] / bcal / bcal-basic.c
index 52734deec94a19ae3107264a4214cbde94760307..78a490d1467a9b0232f258ad85db75fed1676839 100644 (file)
@@ -39,13 +39,15 @@ uint8_t bcal_cipher_init(const bcdesc_t *cipher_descriptor,
     init_fpt.initvoid =
             (void_fpt) (pgm_read_word(&(cipher_descriptor->init.initvoid)));
     if (init_fpt.initvoid == NULL) {
-        if (!(ctx->ctx = malloc((keysize_b + 7) / 8)))
+        if (!(ctx->ctx = malloc((keysize_b + 7) / 8))) {
             return 2;
+        }
         memcpy(ctx->ctx, key, (keysize_b + 7) / 8);
         return 0;
     }
-    if (!(ctx->ctx = malloc(pgm_read_word(&(cipher_descriptor->ctxsize_B)))))
+    if (!(ctx->ctx = malloc(pgm_read_word(&(cipher_descriptor->ctxsize_B))))) {
         return 3;
+    }
     if ((flags & BC_INIT_TYPE) == BC_INIT_TYPE_1) {
         init_fpt.init1((void*) key, (ctx->ctx));
     } else {