From 75ebbd9aa411c5b8b19ded6ace2b34181566b56a Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Wed, 6 May 2015 13:43:59 -0400 Subject: Use p==NULL not !p (in if statements, mainly) Reviewed-by: Tim Hudson --- apps/pkcs8.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/pkcs8.c') diff --git a/apps/pkcs8.c b/apps/pkcs8.c index 07ebf3b86f..55c4eea0aa 100644 --- a/apps/pkcs8.c +++ b/apps/pkcs8.c @@ -211,7 +211,7 @@ int pkcs8_main(int argc, char **argv) pkey = load_key(infile, informat, 1, passin, e, "key"); if (!pkey) goto end; - if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) { + if ((p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken)) == NULL) { BIO_printf(bio_err, "Error converting key\n"); ERR_print_errors(bio_err); goto end; @@ -235,9 +235,9 @@ int pkcs8_main(int argc, char **argv) goto end; } app_RAND_load_file(NULL, 0); - if (!(p8 = PKCS8_encrypt(pbe_nid, cipher, - p8pass, strlen(p8pass), - NULL, 0, iter, p8inf))) { + if ((p8 = PKCS8_encrypt(pbe_nid, cipher, + p8pass, strlen(p8pass), + NULL, 0, iter, p8inf)) == NULL) { BIO_printf(bio_err, "Error encrypting key\n"); ERR_print_errors(bio_err); goto end; @@ -296,7 +296,7 @@ int pkcs8_main(int argc, char **argv) goto end; } - if (!(pkey = EVP_PKCS82PKEY(p8inf))) { + if ((pkey = EVP_PKCS82PKEY(p8inf)) == NULL) { BIO_printf(bio_err, "Error converting key\n"); ERR_print_errors(bio_err); goto end; -- cgit v1.2.3