[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Tue Jun 7 15:09:00 UTC 2016


The branch master has been updated
       via  56989dcd0e208dcad204e85367a20fab2a45e2f8 (commit)
      from  47ae05ba6288c831a9aa4282f9cce40372e79ea9 (commit)


- Log -----------------------------------------------------------------
commit 56989dcd0e208dcad204e85367a20fab2a45e2f8
Author: Rich Salz <rsalz at openssl.org>
Date:   Tue Jun 7 10:54:42 2016 -0400

    Fix some GitHub issues.
    
    GH1180: Local variable sometimes unused
    GH1181: Missing close paren.
    
    Thanks to <wipedout at yandex.ru> for reporting these.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/des/str2key.c | 8 ++++----
 engines/e_chil.c     | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/crypto/des/str2key.c b/crypto/des/str2key.c
index 4dc661f..78998a1 100644
--- a/crypto/des/str2key.c
+++ b/crypto/des/str2key.c
@@ -14,7 +14,6 @@ void DES_string_to_key(const char *str, DES_cblock *key)
 {
     DES_key_schedule ks;
     int i, length;
-    register unsigned char j;
 
     memset(key, 0, 8);
     length = strlen(str);
@@ -23,7 +22,8 @@ void DES_string_to_key(const char *str, DES_cblock *key)
         (*key)[i % 8] ^= (str[i] << 1);
 #else                           /* MIT COMPATIBLE */
     for (i = 0; i < length; i++) {
-        j = str[i];
+        register unsigned char j = str[i];
+
         if ((i % 16) < 8)
             (*key)[i % 8] ^= (j << 1);
         else {
@@ -46,7 +46,6 @@ void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2)
 {
     DES_key_schedule ks;
     int i, length;
-    register unsigned char j;
 
     memset(key1, 0, 8);
     memset(key2, 0, 8);
@@ -66,7 +65,8 @@ void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2)
     }
 #else                           /* MIT COMPATIBLE */
     for (i = 0; i < length; i++) {
-        j = str[i];
+        register unsigned char j = str[i];
+
         if ((i % 32) < 16) {
             if ((i % 16) < 8)
                 (*key1)[i % 8] ^= (j << 1);
diff --git a/engines/e_chil.c b/engines/e_chil.c
index c660aa9..8d81b46 100644
--- a/engines/e_chil.c
+++ b/engines/e_chil.c
@@ -641,7 +641,7 @@ static int hwcrhk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
             CRYPTO_THREAD_write_lock(chil_lock);
             BIO_free(logstream);
             logstream = NULL;
-            if (BIO_up_ref(bio)
+            if (BIO_up_ref(bio))
                 logstream = bio;
             else
                 HWCRHKerr(HWCRHK_F_HWCRHK_CTRL, HWCRHK_R_BIO_WAS_FREED);


More information about the openssl-commits mailing list