X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=apps%2Fcrl2p7.c;h=79217e9efce7bc10dfef5e1e9f2cdc4eacdf05bc;hb=b6705d4893d1566c3a5427e387ce99344497758d;hp=1631258793ec96ae5d653be3b6ebb7bfa7f3c26d;hpb=1c422164d8343688b8356fcb26f6b7e06921433b;p=openssl.git diff --git a/apps/crl2p7.c b/apps/crl2p7.c index 1631258793..79217e9efc 100644 --- a/apps/crl2p7.c +++ b/apps/crl2p7.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -25,7 +25,7 @@ typedef enum OPTION_choice { OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_NOCRL, OPT_CERTFILE } OPTION_CHOICE; -OPTIONS crl2pkcs7_options[] = { +const OPTIONS crl2pkcs7_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "Input format - DER or PEM"}, {"outform", OPT_OUTFORM, 'F', "Output format - DER or PEM"}, @@ -84,10 +84,8 @@ int crl2pkcs7_main(int argc, char **argv) if ((certflst == NULL) && (certflst = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - if (!sk_OPENSSL_STRING_push(certflst, opt_arg())) { - sk_OPENSSL_STRING_free(certflst); + if (!sk_OPENSSL_STRING_push(certflst, opt_arg())) goto end; - } break; } } @@ -133,7 +131,7 @@ int crl2pkcs7_main(int argc, char **argv) goto end; p7s->cert = cert_stack; - if (certflst) + if (certflst != NULL) for (i = 0; i < sk_OPENSSL_STRING_num(certflst); i++) { certfile = sk_OPENSSL_STRING_value(certflst, i); if (add_certs_from_file(cert_stack, certfile) < 0) { @@ -164,7 +162,7 @@ int crl2pkcs7_main(int argc, char **argv) PKCS7_free(p7); X509_CRL_free(crl); - return (ret); + return ret; } /*- @@ -214,5 +212,5 @@ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile) /* never need to OPENSSL_free x */ BIO_free(in); sk_X509_INFO_free(sk); - return (ret); + return ret; }