[openssl] master update

shane.lontis at oracle.com shane.lontis at oracle.com
Wed Feb 5 03:48:38 UTC 2020


The branch master has been updated
       via  8f2fe32df26244da7c76ecc691e29c0777648d21 (commit)
      from  e558ae49213c1b7e58addc322675757ec93c2829 (commit)


- Log -----------------------------------------------------------------
commit 8f2fe32df26244da7c76ecc691e29c0777648d21
Author: Ross Kinsey <RossIKinsey at gmail.com>
Date:   Wed Feb 5 13:47:05 2020 +1000

    Author: Ross Kinsey <RossIKinsey at gmail.com>
    Date:   Wed Jan 29 00:19:40 2020 -0500
    
    Removed unnecessary switch statements from bio/bf_* callback_ctrl functions
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/10967)

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

Summary of changes:
 crypto/bio/bf_buff.c | 9 +--------
 crypto/bio/bf_lbuf.c | 9 +--------
 crypto/bio/bf_nbio.c | 9 +--------
 crypto/bio/bf_null.c | 9 +--------
 4 files changed, 4 insertions(+), 32 deletions(-)

diff --git a/crypto/bio/bf_buff.c b/crypto/bio/bf_buff.c
index 80db0b57ab..df7c5e99ba 100644
--- a/crypto/bio/bf_buff.c
+++ b/crypto/bio/bf_buff.c
@@ -410,16 +410,9 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr)
 
 static long buffer_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
 {
-    long ret = 1;
-
     if (b->next_bio == NULL)
         return 0;
-    switch (cmd) {
-    default:
-        ret = BIO_callback_ctrl(b->next_bio, cmd, fp);
-        break;
-    }
-    return ret;
+    return BIO_callback_ctrl(b->next_bio, cmd, fp);
 }
 
 static int buffer_gets(BIO *b, char *buf, int size)
diff --git a/crypto/bio/bf_lbuf.c b/crypto/bio/bf_lbuf.c
index 6b5a241a0e..32091195bf 100644
--- a/crypto/bio/bf_lbuf.c
+++ b/crypto/bio/bf_lbuf.c
@@ -301,16 +301,9 @@ static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr)
 
 static long linebuffer_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
 {
-    long ret = 1;
-
     if (b->next_bio == NULL)
         return 0;
-    switch (cmd) {
-    default:
-        ret = BIO_callback_ctrl(b->next_bio, cmd, fp);
-        break;
-    }
-    return ret;
+    return BIO_callback_ctrl(b->next_bio, cmd, fp);
 }
 
 static int linebuffer_gets(BIO *b, char *buf, int size)
diff --git a/crypto/bio/bf_nbio.c b/crypto/bio/bf_nbio.c
index 6f6ccfb1a8..36deeb82f0 100644
--- a/crypto/bio/bf_nbio.c
+++ b/crypto/bio/bf_nbio.c
@@ -173,16 +173,9 @@ static long nbiof_ctrl(BIO *b, int cmd, long num, void *ptr)
 
 static long nbiof_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
 {
-    long ret = 1;
-
     if (b->next_bio == NULL)
         return 0;
-    switch (cmd) {
-    default:
-        ret = BIO_callback_ctrl(b->next_bio, cmd, fp);
-        break;
-    }
-    return ret;
+    return BIO_callback_ctrl(b->next_bio, cmd, fp);
 }
 
 static int nbiof_gets(BIO *bp, char *buf, int size)
diff --git a/crypto/bio/bf_null.c b/crypto/bio/bf_null.c
index e548bdc90d..ba693af0a7 100644
--- a/crypto/bio/bf_null.c
+++ b/crypto/bio/bf_null.c
@@ -95,16 +95,9 @@ static long nullf_ctrl(BIO *b, int cmd, long num, void *ptr)
 
 static long nullf_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
 {
-    long ret = 1;
-
     if (b->next_bio == NULL)
         return 0;
-    switch (cmd) {
-    default:
-        ret = BIO_callback_ctrl(b->next_bio, cmd, fp);
-        break;
-    }
-    return ret;
+    return BIO_callback_ctrl(b->next_bio, cmd, fp);
 }
 
 static int nullf_gets(BIO *bp, char *buf, int size)


More information about the openssl-commits mailing list