diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 11:12:26 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 22:48:41 +0000 |
commit | 90945fa31a42dcf3beb90540c618e4d627c595ea (patch) | |
tree | e73870c253abf0c37ca618384e30a7937a996b55 /crypto/asn1/a_strnid.c | |
parent | a71edf3ba275b946224b5bcded0a8ecfce1855c0 (diff) | |
download | openssl-90945fa31a42dcf3beb90540c618e4d627c595ea.zip openssl-90945fa31a42dcf3beb90540c618e4d627c595ea.tar.gz openssl-90945fa31a42dcf3beb90540c618e4d627c595ea.tar.bz2 |
Continue standardising malloc style for libcrypto
Continuing from previous commit ensure our style is consistent for malloc
return checks.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/asn1/a_strnid.c')
-rw-r--r-- | crypto/asn1/a_strnid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/asn1/a_strnid.c b/crypto/asn1/a_strnid.c index 1c6bbd4..43252c1 100644 --- a/crypto/asn1/a_strnid.c +++ b/crypto/asn1/a_strnid.c @@ -235,16 +235,16 @@ static ASN1_STRING_TABLE *stable_get(int nid) { ASN1_STRING_TABLE *tmp, *rv; /* Always need a string table so allocate one if NULL */ - if (!stable) { + if (stable == NULL) { stable = sk_ASN1_STRING_TABLE_new(sk_table_cmp); - if (!stable) + if (stable == NULL) return NULL; } tmp = ASN1_STRING_TABLE_get(nid); if (tmp && tmp->flags & STABLE_FLAGS_MALLOC) return tmp; rv = OPENSSL_malloc(sizeof(*rv)); - if (!rv) + if (rv == NULL) return NULL; if (!sk_ASN1_STRING_TABLE_push(stable, rv)) { OPENSSL_free(rv); |