X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=apps%2Fversion.c;h=7185e9edcd1ddba29af5d7947132e471c21d022d;hb=HEAD;hp=4a289faca0ffed97847e887367d065a82d917ed1;hpb=08073700cc50bcd0df5c0ee68c100e300a320d03;p=openssl.git diff --git a/apps/version.c b/apps/version.c index 4a289faca0..7185e9edcd 100644 --- a/apps/version.c +++ b/apps/version.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -17,7 +17,7 @@ #include typedef enum OPTION_choice { - OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, + OPT_COMMON, OPT_B, OPT_D, OPT_E, OPT_M, OPT_F, OPT_O, OPT_P, OPT_V, OPT_A, OPT_R, OPT_C } OPTION_CHOICE; @@ -97,10 +97,11 @@ opthelp: break; } } - if (opt_num_rest() != 0) { - BIO_printf(bio_err, "Extra parameters given.\n"); + + /* No extra arguments. */ + if (!opt_check_rest_arg(NULL)) goto opthelp; - } + if (!dirty) version = 1;