summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2023-03-11 15:56:03 +0000
committertb <>2023-03-11 15:56:03 +0000
commit1cb4662fa3084e47b21509a54a711ecef28ab3a1 (patch)
tree0b3f28236d108a2e6a0659ab165c8ece51700183 /src/lib
parent33942a676ff7c43cef9927e118be7372ff5a588d (diff)
downloadopenbsd-1cb4662fa3084e47b21509a54a711ecef28ab3a1.tar.gz
openbsd-1cb4662fa3084e47b21509a54a711ecef28ab3a1.tar.bz2
openbsd-1cb4662fa3084e47b21509a54a711ecef28ab3a1.zip
Use "if (ptr == NULL)" instead of "if (!ptr)"
Requested by jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/asn1/bio_ndef.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/bio_ndef.c b/src/lib/libcrypto/asn1/bio_ndef.c
index 7ef08764aa..33dfe73fc9 100644
--- a/src/lib/libcrypto/asn1/bio_ndef.c
+++ b/src/lib/libcrypto/asn1/bio_ndef.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_ndef.c,v 1.13 2023/03/11 15:50:13 tb Exp $ */ 1/* $OpenBSD: bio_ndef.c,v 1.14 2023/03/11 15:56:03 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -105,14 +105,14 @@ BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it)
105 const ASN1_AUX *aux = it->funcs; 105 const ASN1_AUX *aux = it->funcs;
106 ASN1_STREAM_ARG sarg; 106 ASN1_STREAM_ARG sarg;
107 107
108 if (!aux || !aux->asn1_cb) { 108 if (aux == NULL || aux->asn1_cb == NULL) {
109 ASN1error(ASN1_R_STREAMING_NOT_SUPPORTED); 109 ASN1error(ASN1_R_STREAMING_NOT_SUPPORTED);
110 return NULL; 110 return NULL;
111 } 111 }
112 ndef_aux = malloc(sizeof(NDEF_SUPPORT)); 112 ndef_aux = malloc(sizeof(NDEF_SUPPORT));
113 asn_bio = BIO_new(BIO_f_asn1()); 113 asn_bio = BIO_new(BIO_f_asn1());
114 114
115 if (!ndef_aux || !asn_bio) 115 if (ndef_aux == NULL || asn_bio == NULL)
116 goto err; 116 goto err;
117 117
118 if ((out = BIO_push(asn_bio, out)) == NULL) 118 if ((out = BIO_push(asn_bio, out)) == NULL)