diff options
Diffstat (limited to 'apps/prime.c')
-rw-r--r-- | apps/prime.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/prime.c b/apps/prime.c index 3c72330c0a..9aa32d02b0 100644 --- a/apps/prime.c +++ b/apps/prime.c @@ -43,6 +43,7 @@ int prime_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: @@ -69,9 +70,14 @@ int prime_main(int argc, char **argv) argc = opt_num_rest(); argv = opt_rest(); - if (argc == 0 && !generate) { + if (generate) { + if (argc != 0) { + BIO_printf(bio_err, "Extra arguments given.\n"); + goto opthelp; + } + } else if (argc == 0) { BIO_printf(bio_err, "%s: No prime specified\n", prog); - goto end; + goto opthelp; } if (generate) { |