[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Mon Apr 27 01:28:58 UTC 2015


The branch master has been updated
       via  1bb2daead8cf3962098647efa1f74c3bce3e9009 (commit)
       via  bc2f5803ccca07d099e39a291644ded46d52a3b0 (commit)
      from  ce6766de69030b66634518e54dbd301308a51e11 (commit)


- Log -----------------------------------------------------------------
commit 1bb2daead8cf3962098647efa1f74c3bce3e9009
Author: Rich Salz <rsalz at openssl.org>
Date:   Sun Apr 26 21:28:38 2015 -0400

    Simplify parse_yesno; remove local variable
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>

commit bc2f5803ccca07d099e39a291644ded46d52a3b0
Author: Rich Salz <rsalz at openssl.org>
Date:   Sun Apr 26 21:23:43 2015 -0400

    Fix typo in help & comment formatting
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>

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

Summary of changes:
 apps/apps.c | 12 +++---------
 apps/rsa.c  |  8 ++++----
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/apps/apps.c b/apps/apps.c
index 7440d39..462e2b6 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -1803,7 +1803,6 @@ void free_index(CA_DB *db)
 
 int parse_yesno(const char *str, int def)
 {
-    int ret = def;
     if (str) {
         switch (*str) {
         case 'f':              /* false */
@@ -1811,21 +1810,16 @@ int parse_yesno(const char *str, int def)
         case 'n':              /* no */
         case 'N':              /* NO */
         case '0':              /* 0 */
-            ret = 0;
-            break;
+            return 0;
         case 't':              /* true */
         case 'T':              /* TRUE */
         case 'y':              /* yes */
         case 'Y':              /* YES */
         case '1':              /* 1 */
-            ret = 1;
-            break;
-        default:
-            ret = def;
-            break;
+            return 1;
         }
     }
-    return ret;
+    return def;
 }
 
 /*
diff --git a/apps/rsa.c b/apps/rsa.c
index 07cc5fb..8e93dd2 100644
--- a/apps/rsa.c
+++ b/apps/rsa.c
@@ -136,8 +136,8 @@ OPTIONS rsa_options[] = {
     {"pubout", OPT_PUBOUT, '-', "Output a public key"},
     {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"},
     {"passin", OPT_PASSIN, 's', "Input file pass phrase source"},
-    {"RSAPublicKey_in", OPT_RSAPUBKEY_IN, '-', "Input is an RSAPublicKye"},
-    {"RSAPublicKey_out", OPT_RSAPUBKEY_OUT, '-', "Output is an RSAPublicKye"},
+    {"RSAPublicKey_in", OPT_RSAPUBKEY_IN, '-', "Input is an RSAPublicKey"},
+    {"RSAPublicKey_out", OPT_RSAPUBKEY_OUT, '-', "Output is an RSAPublicKey"},
     {"pvk-strong", OPT_PVK_STRONG, '-'},
     {"pvk-weak", OPT_PVK_WEAK, '-'},
     {"pvk-none", OPT_PVK_NONE, '-'},
@@ -321,8 +321,8 @@ int rsa_main(int argc, char **argv)
             }
         }
 
-        if (r == -1 || ERR_peek_error() != 0) { /* should happen only if r ==
-                                                 * -1 */
+        /* should happen only if r == -1 */
+        if (r == -1 || ERR_peek_error() != 0) {
             ERR_print_errors(bio_err);
             goto end;
         }


More information about the openssl-commits mailing list