summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-05-06 13:43:59 -0400
committerRich Salz <rsalz@openssl.org>2015-05-11 10:06:38 -0400
commit75ebbd9aa411c5b8b19ded6ace2b34181566b56a (patch)
tree6bc9cd77b2794b25f9cd9aac1c66f4626fb975a5
parent344c271eb339fc2982e9a3584a94e51112d84584 (diff)
Use p==NULL not !p (in if statements, mainly)
Reviewed-by: Tim Hudson <tjh@openssl.org>
-rw-r--r--apps/apps.c5
-rw-r--r--apps/ca.c2
-rw-r--r--apps/cms.c22
-rw-r--r--apps/crl.c2
-rw-r--r--apps/crl2p7.c3
-rw-r--r--apps/pkcs12.c18
-rw-r--r--apps/pkcs8.c10
-rw-r--r--apps/req.c2
-rw-r--r--apps/s_client.c3
-rw-r--r--apps/smime.c12
-rw-r--r--apps/srp.c27
-rw-r--r--apps/ts.c82
-rw-r--r--apps/verify.c2
-rw-r--r--apps/x509.c4
-rw-r--r--crypto/asn1/a_mbstr.c2
-rw-r--r--crypto/asn1/a_time.c4
-rw-r--r--crypto/asn1/asn1_gen.c29
-rw-r--r--crypto/asn1/asn_mime.c29
-rw-r--r--crypto/asn1/asn_moid.c3
-rw-r--r--crypto/asn1/asn_mstbl.c3
-rw-r--r--crypto/asn1/asn_pack.c8
-rw-r--r--crypto/asn1/p5_pbev2.c17
-rw-r--r--crypto/asn1/x_x509a.c25
-rw-r--r--crypto/bio/bf_nbio.c2
-rw-r--r--crypto/bio/bss_conn.c2
-rw-r--r--crypto/bio/bss_dgram.c2
-rw-r--r--crypto/bio/bss_mem.c4
-rw-r--r--crypto/cms/cms_smime.c3
-rw-r--r--crypto/conf/conf_def.c2
-rw-r--r--crypto/conf/conf_lib.c8
-rw-r--r--crypto/dh/dh_ameth.c21
-rw-r--r--crypto/dsa/dsa_ameth.c28
-rw-r--r--crypto/ec/ec_ameth.c8
-rw-r--r--crypto/ec/ec_asn1.c2
-rw-r--r--crypto/ec/ec_curve.c12
-rw-r--r--crypto/ec/ec_mult.c5
-rw-r--r--crypto/ec/ec_pmeth.c2
-rw-r--r--crypto/evp/evp_cnf.c3
-rw-r--r--crypto/evp/evp_pbe.c5
-rw-r--r--crypto/evp/evp_pkey.c4
-rw-r--r--crypto/evp/pmeth_lib.c2
-rw-r--r--crypto/objects/obj_dat.c10
-rw-r--r--crypto/ocsp/ocsp_cl.c7
-rw-r--r--crypto/ocsp/ocsp_ext.c27
-rw-r--r--crypto/ocsp/ocsp_lib.c6
-rw-r--r--crypto/ocsp/ocsp_prn.c2
-rw-r--r--crypto/ocsp/ocsp_srv.c22
-rw-r--r--crypto/ocsp/ocsp_vfy.c3
-rw-r--r--crypto/pem/pem_pk8.c9
-rw-r--r--crypto/pem/pvkfmt.c5
-rw-r--r--crypto/pkcs12/p12_add.c18
-rw-r--r--crypto/pkcs12/p12_attr.c3
-rw-r--r--crypto/pkcs12/p12_crt.c4
-rw-r--r--crypto/pkcs12/p12_decr.c6
-rw-r--r--crypto/pkcs12/p12_init.c5
-rw-r--r--crypto/pkcs12/p12_kiss.c8
-rw-r--r--crypto/pkcs12/p12_mutl.c11
-rw-r--r--crypto/pkcs12/p12_npas.c14
-rw-r--r--crypto/pkcs12/p12_p8e.c4
-rw-r--r--crypto/pkcs12/p12_utl.c6
-rw-r--r--crypto/pkcs7/pk7_attr.c13
-rw-r--r--crypto/pkcs7/pk7_doit.c7
-rw-r--r--crypto/pkcs7/pk7_lib.c6
-rw-r--r--crypto/pkcs7/pk7_smime.c22
-rw-r--r--crypto/rsa/rsa_ameth.c6
-rw-r--r--crypto/rsa/rsa_pmeth.c4
-rw-r--r--crypto/srp/srp_lib.c13
-rw-r--r--crypto/srp/srp_vfy.c19
-rw-r--r--crypto/ts/ts_conf.c61
-rw-r--r--crypto/ts/ts_rsp_sign.c107
-rw-r--r--crypto/ts/ts_rsp_verify.c19
-rw-r--r--crypto/ts/ts_verify_ctx.c10
-rw-r--r--crypto/txt_db/txt_db.c2
-rw-r--r--crypto/x509/x509_att.c4
-rw-r--r--crypto/x509/x509_trs.c7
-rw-r--r--crypto/x509/x509spki.c2
-rw-r--r--crypto/x509v3/pcy_tree.c2
-rw-r--r--crypto/x509v3/v3_akey.c6
-rw-r--r--crypto/x509v3/v3_alt.c38
-rw-r--r--crypto/x509v3/v3_bcons.c3
-rw-r--r--crypto/x509v3/v3_bitst.c2
-rw-r--r--crypto/x509v3/v3_conf.c25
-rw-r--r--crypto/x509v3/v3_cpols.c32
-rw-r--r--crypto/x509v3/v3_crld.c11
-rw-r--r--crypto/x509v3/v3_extku.c4
-rw-r--r--crypto/x509v3/v3_ia5.c5
-rw-r--r--crypto/x509v3/v3_info.c7
-rw-r--r--crypto/x509v3/v3_lib.c15
-rw-r--r--crypto/x509v3/v3_pci.c2
-rw-r--r--crypto/x509v3/v3_pcons.c3
-rw-r--r--crypto/x509v3/v3_pmaps.c2
-rw-r--r--crypto/x509v3/v3_prn.c9
-rw-r--r--crypto/x509v3/v3_purp.c5
-rw-r--r--crypto/x509v3/v3_skey.c6
-rw-r--r--crypto/x509v3/v3_sxnet.c28
-rw-r--r--crypto/x509v3/v3_utl.c32
-rw-r--r--crypto/x509v3/v3prin.c5
-rw-r--r--demos/engines/cluster_labs/hw_cluster_labs.c29
-rw-r--r--demos/engines/ibmca/hw_ibmca.c10
-rw-r--r--demos/engines/zencod/hw_zencod.c70
-rw-r--r--demos/pkcs12/pkread.c4
-rw-r--r--demos/pkcs12/pkwrite.c4
-rw-r--r--engines/ccgost/gost2001.c2
-rw-r--r--engines/ccgost/gost_ameth.c2
-rw-r--r--engines/e_4758cca.c25
-rw-r--r--engines/e_aep.c18
-rw-r--r--engines/e_atalla.c11
-rw-r--r--engines/e_capi.c6
-rw-r--r--engines/e_chil.c29
-rw-r--r--engines/e_cswift.c14
-rw-r--r--engines/e_sureware.c6
-rw-r--r--engines/e_ubsec.c40
-rw-r--r--ssl/d1_srtp.c2
-rw-r--r--ssl/kssl.c6
-rw-r--r--ssl/s3_clnt.c18
-rw-r--r--ssl/s3_srvr.c2
-rw-r--r--ssl/tls_srp.c23
-rw-r--r--test/ectest.c14
118 files changed, 754 insertions, 724 deletions
diff --git a/apps/apps.c b/apps/apps.c
index 1c182bafb6..ab6eb40579 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -502,11 +502,12 @@ int add_oid_section(CONF *conf)
STACK_OF(CONF_VALUE) *sktmp;
CONF_VALUE *cnf;
int i;
- if (!(p = NCONF_get_string(conf, NULL, "oid_section"))) {
+
+ if ((p = NCONF_get_string(conf, NULL, "oid_section")) == NULL) {
ERR_clear_error();
return 1;
}
- if (!(sktmp = NCONF_get_section(conf, p))) {
+ if ((sktmp = NCONF_get_section(conf, p)) == NULL) {
BIO_printf(bio_err, "problem loading oid section %s\n", p);
return 0;
}
diff --git a/apps/ca.c b/apps/ca.c
index d7a9aca07d..58f1243cdf 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1703,7 +1703,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509,
* Its best to dup the subject DN and then delete any email addresses
* because this retains its structure.
*/
- if (!(dn_subject = X509_NAME_dup(subject))) {
+ if ((dn_subject = X509_NAME_dup(subject)) == NULL) {
BIO_printf(bio_err, "Memory allocation failure\n");
goto end;
}
diff --git a/apps/cms.c b/apps/cms.c
index 5eb5d2df6f..5293fbdc6d 100644
--- a/apps/cms.c
+++ b/apps/cms.c
@@ -717,8 +717,8 @@ int cms_main(int argc, char **argv)
if ((encerts = sk_X509_new_null()) == NULL)
goto end;
while (*argv) {
- if (!(cert = load_cert(*argv, FORMAT_PEM,
- NULL, e, "recipient certificate file")))
+ if ((cert = load_cert(*argv, FORMAT_PEM, NULL, e,
+ "recipient certificate file")) == NULL)
goto end;
sk_X509_push(encerts, cert);
cert = NULL;
@@ -727,24 +727,24 @@ int cms_main(int argc, char **argv)
}
if (certfile) {
- if (!(other = load_certs(certfile, FORMAT_PEM, NULL,
- e, "certificate file"))) {
+ if ((other = load_certs(certfile, FORMAT_PEM, NULL, e,
+ "certificate file")) == NULL) {
ERR_print_errors(bio_err);
goto end;
}
}
if (recipfile && (operation == SMIME_DECRYPT)) {
- if (!(recip = load_cert(recipfile, FORMAT_PEM, NULL,
- e, "recipient certificate file"))) {
+ if ((recip = load_cert(recipfile, FORMAT_PEM, NULL, e,
+ "recipient certificate file")) == NULL) {
ERR_print_errors(bio_err);
goto end;
}
}
if (operation == SMIME_SIGN_RECEIPT) {
- if (!(signer = load_cert(signerfile, FORMAT_PEM, NULL,
- e, "receipt signer certificate file"))) {
+ if ((signer = load_cert(signerfile, FORMAT_PEM, NULL, e,
+ "receipt signer certificate file")) == NULL) {
ERR_print_errors(bio_err);
goto end;
}
@@ -787,7 +787,7 @@ int cms_main(int argc, char **argv)
}
if (contfile) {
BIO_free(indata);
- if (!(indata = BIO_new_file(contfile, "rb"))) {
+ if ((indata = BIO_new_file(contfile, "rb")) == NULL) {
BIO_printf(bio_err, "Can't read content file %s\n", contfile);
goto end;
}
@@ -807,7 +807,7 @@ int cms_main(int argc, char **argv)
if (rctfile) {
char *rctmode = (rctformat == FORMAT_ASN1) ? "rb" : "r";
- if (!(rctin = BIO_new_file(rctfile, rctmode))) {
+ if ((rctin = BIO_new_file(rctfile, rctmode)) == NULL) {
BIO_printf(bio_err, "Can't open receipt file %s\n", rctfile);
goto end;
}
@@ -834,7 +834,7 @@ int cms_main(int argc, char **argv)
goto end;
if ((operation == SMIME_VERIFY) || (operation == SMIME_VERIFY_RECEIPT)) {
- if (!(store = setup_verify(CAfile, CApath)))
+ if ((store = setup_verify(CAfile, CApath)) == NULL)
goto end;
X509_STORE_set_verify_cb(store, cms_cb);
if (vpmtouched)
diff --git a/apps/crl.c b/apps/crl.c
index b8c592c6e2..443889a753 100644
--- a/apps/crl.c
+++ b/apps/crl.c
@@ -222,7 +222,7 @@ int crl_main(int argc, char **argv)
goto end;
if (do_ver) {
- if (!(store = setup_verify(CAfile, CApath)))
+ if ((store = setup_verify(CAfile, CApath)) == NULL)
goto end;
lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
if (lookup == NULL)
diff --git a/apps/crl2p7.c b/apps/crl2p7.c
index fb2b085ead..f05ad4ae52 100644
--- a/apps/crl2p7.c
+++ b/