summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x_name.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-09-16 21:28:57 +0200
committerRichard Levitte <levitte@openssl.org>2019-10-09 21:32:15 +0200
commit12a765a5235f181c2f4992b615eb5f892c368e88 (patch)
tree67ece1a3fb210bd4895aea73649773fc912a60d6 /crypto/x509/x_name.c
parentRefactor -passin/-passout documentation (diff)
downloadopenssl-12a765a5235f181c2f4992b615eb5f892c368e88.tar.xz
openssl-12a765a5235f181c2f4992b615eb5f892c368e88.zip
Explicitly test against NULL; do not use !p or similar
Also added blanks lines after declarations in a couple of places. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9916)
Diffstat (limited to 'crypto/x509/x_name.c')
-rw-r--r--crypto/x509/x_name.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c
index 33faacf5dd..59d6531bf8 100644
--- a/crypto/x509/x_name.c
+++ b/crypto/x509/x_name.c
@@ -114,7 +114,7 @@ static void x509_name_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it)
{
X509_NAME *a;
- if (!pval || !*pval)
+ if (pval == NULL || *pval == NULL)
return;
a = (X509_NAME *)*pval;
@@ -503,9 +503,9 @@ int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase)
l = 80 - 2 - obase;
b = X509_NAME_oneline(name, NULL, 0);
- if (!b)
+ if (b == NULL)
return 0;
- if (!*b) {
+ if (*b == '\0') {
OPENSSL_free(b);
return 1;
}