diff options
author | Rich Salz <rsalz@akamai.com> | 2015-05-06 19:43:59 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-11 16:06:38 +0200 |
commit | 75ebbd9aa411c5b8b19ded6ace2b34181566b56a (patch) | |
tree | 6bc9cd77b2794b25f9cd9aac1c66f4626fb975a5 /crypto/x509v3/v3prin.c | |
parent | Add missing NULL check in X509V3_parse_list() (diff) | |
download | openssl-75ebbd9aa411c5b8b19ded6ace2b34181566b56a.tar.xz openssl-75ebbd9aa411c5b8b19ded6ace2b34181566b56a.zip |
Use p==NULL not !p (in if statements, mainly)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/x509v3/v3prin.c')
-rw-r--r-- | crypto/x509v3/v3prin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/x509v3/v3prin.c b/crypto/x509v3/v3prin.c index cbc357079d..36ca040bc5 100644 --- a/crypto/x509v3/v3prin.c +++ b/crypto/x509v3/v3prin.c @@ -69,17 +69,18 @@ int main(int argc, char **argv) FILE *inf; int i, count; X509_EXTENSION *ext; + X509V3_add_standard_extensions(); ERR_load_crypto_strings(); if (!argv[1]) { fprintf(stderr, "Usage v3prin cert.pem\n"); exit(1); } - if (!(inf = fopen(argv[1], "r"))) { + if ((inf = fopen(argv[1], "r")) == NULL) { fprintf(stderr, "Can't open %s\n", argv[1]); exit(1); } - if (!(cert = PEM_read_X509(inf, NULL, NULL))) { + if ((cert = PEM_read_X509(inf, NULL, NULL)) == NULL) { fprintf(stderr, "Can't read certificate %s\n", argv[1]); ERR_print_errors_fp(stderr); exit(1); |