diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2015-02-14 13:32:47 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2015-02-14 13:32:47 +0000 |
commit | 73e0114ede7c4fbf8404fd096ddaf2d1462507d9 (patch) | |
tree | 714e141aa0cdf4d822d4785d83aec5fb10634c41 /lib/libcrypto/asn1/tasn_fre.c | |
parent | 5444e3f7b6769d79547b3dff4b3cbcbd7c7d2a85 (diff) |
Spell NULL correctly, be explicit with NULL checks and it is also easier to
initialise during declaration and drop the else statement.
ok doug@ miod@
Diffstat (limited to 'lib/libcrypto/asn1/tasn_fre.c')
-rw-r--r-- | lib/libcrypto/asn1/tasn_fre.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libcrypto/asn1/tasn_fre.c b/lib/libcrypto/asn1/tasn_fre.c index d8d55a536ca..36b668a7f9c 100644 --- a/lib/libcrypto/asn1/tasn_fre.c +++ b/lib/libcrypto/asn1/tasn_fre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tasn_fre.c,v 1.12 2014/07/10 12:24:25 tedu Exp $ */ +/* $OpenBSD: tasn_fre.c,v 1.13 2015/02/14 13:32:46 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -86,16 +86,14 @@ asn1_item_combine_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int combine) const ASN1_EXTERN_FUNCS *ef; const ASN1_COMPAT_FUNCS *cf; const ASN1_AUX *aux = it->funcs; - ASN1_aux_cb *asn1_cb; + ASN1_aux_cb *asn1_cb = NULL; int i; if (pval == NULL || *pval == NULL) return; - if (aux && aux->asn1_cb) + if (aux != NULL && aux->asn1_cb != NULL) asn1_cb = aux->asn1_cb; - else - asn1_cb = 0; switch (it->itype) { case ASN1_ITYPE_PRIMITIVE: |