[openssl] master update

Dr. Paul Dale pauli at openssl.org
Thu Feb 20 08:54:28 UTC 2020


The branch master has been updated
       via  1f2235ea4e48a48f0c06406c22c8ae31a6ccaae6 (commit)
      from  cc0663f697b05ed121a728241f0502250429802d (commit)


- Log -----------------------------------------------------------------
commit 1f2235ea4e48a48f0c06406c22c8ae31a6ccaae6
Author: Dane (4cad at silvertoque) <dslh.4cad at gmail.com>
Date:   Tue Feb 18 21:38:12 2020 -0500

    Remove unneeded switch statement to fix warning
    
    https://github.com/openssl/openssl/issues/10958
    
    CLA: trivial
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/11125)

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

Summary of changes:
 crypto/evp/bio_b64.c | 9 ++-------
 crypto/evp/bio_enc.c | 9 ++-------
 crypto/evp/bio_md.c  | 8 +-------
 crypto/evp/bio_ok.c  | 9 +--------
 4 files changed, 6 insertions(+), 29 deletions(-)

diff --git a/crypto/evp/bio_b64.c b/crypto/evp/bio_b64.c
index aef9a85459..5f9d3f094b 100644
--- a/crypto/evp/bio_b64.c
+++ b/crypto/evp/bio_b64.c
@@ -534,17 +534,12 @@ static long b64_ctrl(BIO *b, int cmd, long num, void *ptr)
 
 static long b64_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
 {
-    long ret = 1;
     BIO *next = BIO_next(b);
 
     if (next == NULL)
         return 0;
-    switch (cmd) {
-    default:
-        ret = BIO_callback_ctrl(next, cmd, fp);
-        break;
-    }
-    return ret;
+
+    return BIO_callback_ctrl(next, cmd, fp);
 }
 
 static int b64_puts(BIO *b, const char *str)
diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c
index 9fa10ebff6..e780135b3d 100644
--- a/crypto/evp/bio_enc.c
+++ b/crypto/evp/bio_enc.c
@@ -388,17 +388,12 @@ static long enc_ctrl(BIO *b, int cmd, long num, void *ptr)
 
 static long enc_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
 {
-    long ret = 1;
     BIO *next = BIO_next(b);
 
     if (next == NULL)
         return 0;
-    switch (cmd) {
-    default:
-        ret = BIO_callback_ctrl(next, cmd, fp);
-        break;
-    }
-    return ret;
+    
+    return BIO_callback_ctrl(next, cmd, fp);
 }
 
 int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
diff --git a/crypto/evp/bio_md.c b/crypto/evp/bio_md.c
index aca177e9da..dbc9f395d0 100644
--- a/crypto/evp/bio_md.c
+++ b/crypto/evp/bio_md.c
@@ -197,7 +197,6 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
 
 static long md_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
 {
-    long ret = 1;
     BIO *next;
 
     next = BIO_next(b);
@@ -205,12 +204,7 @@ static long md_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
     if (next == NULL)
         return 0;
 
-    switch (cmd) {
-    default:
-        ret = BIO_callback_ctrl(next, cmd, fp);
-        break;
-    }
-    return ret;
+    return BIO_callback_ctrl(next, cmd, fp);
 }
 
 static int md_gets(BIO *bp, char *buf, int size)
diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c
index f94882829b..9129fe038e 100644
--- a/crypto/evp/bio_ok.c
+++ b/crypto/evp/bio_ok.c
@@ -406,7 +406,6 @@ static long ok_ctrl(BIO *b, int cmd, long num, void *ptr)
 
 static long ok_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
 {
-    long ret = 1;
     BIO *next;
 
     next = BIO_next(b);
@@ -414,13 +413,7 @@ static long ok_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
     if (next == NULL)
         return 0;
 
-    switch (cmd) {
-    default:
-        ret = BIO_callback_ctrl(next, cmd, fp);
-        break;
-    }
-
-    return ret;
+    return BIO_callback_ctrl(next, cmd, fp);
 }
 
 static void longswap(void *_ptr, size_t len)


More information about the openssl-commits mailing list