Ignore ORDINALS in build.info files, and remove its documentation
[openssl.git] / apps / version.c
index c9727daf5203228b3f1d403745201de9d38cb94d..7fc9a27d678421722bb95a4377037be998e4c020 100644 (file)
@@ -72,6 +72,7 @@ int version_main(int argc, char **argv)
         switch (o) {
         case OPT_EOF:
         case OPT_ERR:
+opthelp:
             BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
             goto end;
         case OPT_HELP:
@@ -107,6 +108,10 @@ int version_main(int argc, char **argv)
             break;
         }
     }
+    if (opt_num_rest() != 0) {
+        BIO_printf(bio_err, "Extra parameters given.\n");
+        goto opthelp;
+    }
     if (!dirty)
         version = 1;
 
@@ -183,5 +188,5 @@ int version_main(int argc, char **argv)
     }
     ret = 0;
  end:
-    return (ret);
+    return ret;
 }