[openssl-commits] [openssl] master update

Ben Laurie ben at openssl.org
Wed Sep 30 12:56:39 UTC 2015


The branch master has been updated
       via  19948ceab73d11217cf4df51e5b489aa487a2561 (commit)
      from  c58f3e4293cc0d00b19f48d61e77f6312a37375a (commit)


- Log -----------------------------------------------------------------
commit 19948ceab73d11217cf4df51e5b489aa487a2561
Author: Ben Laurie <ben at links.org>
Date:   Wed Sep 30 12:17:52 2015 +0100

    Display brief help if no options for list.
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>

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

Summary of changes:
 apps/openssl.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/apps/openssl.c b/apps/openssl.c
index 1c9ce13..81a3762 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -493,11 +493,12 @@ int list_main(int argc, char **argv)
 {
     char *prog;
     HELPLIST_CHOICE o;
+    int done = 0;
 
     prog = opt_init(argc, argv, list_options);
     while ((o = opt_next()) != OPT_EOF) {
         switch (o) {
-        case OPT_EOF:
+        case OPT_EOF:  /* Never hit, but suppresses warning */
         case OPT_ERR:
             BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
             return 1;
@@ -526,6 +527,12 @@ int list_main(int argc, char **argv)
             list_disabled();
             break;
         }
+        done = 1;
+    }
+
+    if (!done) {
+        BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
+        return 1;
     }
 
     return 0;


More information about the openssl-commits mailing list