aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/x_x509a.c
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 /crypto/asn1/x_x509a.c
parent344c271eb339fc2982e9a3584a94e51112d84584 (diff)
downloadopenssl-75ebbd9aa411c5b8b19ded6ace2b34181566b56a.tar.gz
Use p==NULL not !p (in if statements, mainly)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/asn1/x_x509a.c')
-rw-r--r--crypto/asn1/x_x509a.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/crypto/asn1/x_x509a.c b/crypto/asn1/x_x509a.c
index 775e46f516..b0a6b4a70a 100644
--- a/crypto/asn1/x_x509a.c
+++ b/crypto/asn1/x_x509a.c
@@ -84,9 +84,9 @@ IMPLEMENT_ASN1_FUNCTIONS(X509_CERT_AUX)
static X509_CERT_AUX *aux_get(X509 *x)
{
- if (!x)
+ if (x == NULL)
return NULL;
- if (!x->aux && !(x->aux = X509_CERT_AUX_new()))
+ if (x->aux == NULL && (x->aux = X509_CERT_AUX_new()) == NULL)
return NULL;
return x->aux;
}
@@ -101,9 +101,9 @@ int X509_alias_set1(X509 *x, unsigned char *name, int len)
x->aux->alias = NULL;
return 1;
}
- if (!(aux = aux_get(x)))
+ if ((aux = aux_get(x)) == NULL)
return 0;
- if (!aux->alias && !(aux->alias = ASN1_UTF8STRING_new()))
+ if (aux->alias == NULL && (aux->alias = ASN1_UTF8STRING_new()) == NULL)
return 0;
return ASN1_STRING_set(aux->alias, name, len);
}
@@ -118,9 +118,10 @@ int X509_keyid_set1(X509 *x, unsigned char *id, int len)
x->aux->keyid = NULL;
return 1;
}
- if (!(aux = aux_get(x)))
+ if ((aux = aux_get(x)) == NULL)
return 0;
- if (!aux->keyid && !(aux->keyid = ASN1_OCTET_STRING_new()))
+ if (aux->keyid ==NULL
+ && (aux->keyid = ASN1_OCTET_STRING_new()) == NULL)
return 0;
return ASN1_STRING_set(aux->keyid, id, len);
}
@@ -152,9 +153,10 @@ int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj)
if (!objtmp)
return 0;
}
- if (!(aux = aux_get(x)))
+ if ((aux = aux_get(x)) == NULL)
goto err;
- if (!aux->trust && !(aux->trust = sk_ASN1_OBJECT_new_null()))
+ if (aux->trust == NULL
+ && (aux->trust = sk_ASN1_OBJECT_new_null()) == NULL)
goto err;
if (!objtmp || sk_ASN1_OBJECT_push(aux->trust, objtmp))
return 1;
@@ -167,11 +169,12 @@ int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj)
{
X509_CERT_AUX *aux;
ASN1_OBJECT *objtmp;
- if (!(objtmp = OBJ_dup(obj)))
+ if ((objtmp = OBJ_dup(obj)) == NULL)
return 0;
- if (!(aux = aux_get(x)))
+ if ((aux = aux_get(x)) == NULL)
return 0;
- if (!aux->reject && !(aux->reject = sk_ASN1_OBJECT_new_null()))
+ if (aux->reject == NULL
+ && (aux->reject = sk_ASN1_OBJECT_new_null()) == NULL)
return 0;
return sk_ASN1_OBJECT_push(aux->reject, objtmp);
}