[Cryptech-Commits] [sw/libhal] 01/02: Silence compiler warning in revised hal_ks_fetch().

git at cryptech.is git at cryptech.is
Sun May 20 19:55:36 UTC 2018


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch master
in repository sw/libhal.

commit 3ec74465ddd47a74bdaa7359831e25f868f09680
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Sun May 20 15:38:19 2018 -0400

    Silence compiler warning in revised hal_ks_fetch().
---
 ks.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ks.c b/ks.c
index f4015e0..2b3c1c1 100644
--- a/ks.c
+++ b/ks.c
@@ -616,6 +616,7 @@ hal_error_t hal_ks_fetch(hal_ks_t *ks,
 
   hal_error_t err = HAL_OK;
   hal_ks_block_t *block;
+  size_t k_der_len = 0;
   unsigned b;
 
   hal_ks_lock();
@@ -633,8 +634,8 @@ hal_error_t hal_ks_fetch(hal_ks_t *ks,
   hal_ks_cache_mark_used(ks, block, b);
 
   hal_ks_key_block_t *k = &block->key;
-  const size_t k_der_len = k->der_len;
 
+  k_der_len   = k->der_len;
   slot->type  = k->type;
   slot->curve = k->curve;
   slot->flags = k->flags;



More information about the Commits mailing list