diff options
| author | jsing <> | 2015-02-14 13:32:46 +0000 |
|---|---|---|
| committer | jsing <> | 2015-02-14 13:32:46 +0000 |
| commit | e2784ea0eadb4672a77993d540ef3be8ed05f3be (patch) | |
| tree | 4662e808b6c38d0467e9e0bc33b8933170e6e70b /src/lib/libcrypto/asn1/tasn_fre.c | |
| parent | 67f5fc050c82d7526b6add1ca9b85f39e47b24d8 (diff) | |
| download | openbsd-e2784ea0eadb4672a77993d540ef3be8ed05f3be.tar.gz openbsd-e2784ea0eadb4672a77993d540ef3be8ed05f3be.tar.bz2 openbsd-e2784ea0eadb4672a77993d540ef3be8ed05f3be.zip | |
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 'src/lib/libcrypto/asn1/tasn_fre.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/tasn_fre.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_fre.c b/src/lib/libcrypto/asn1/tasn_fre.c index d8d55a536c..36b668a7f9 100644 --- a/src/lib/libcrypto/asn1/tasn_fre.c +++ b/src/lib/libcrypto/asn1/tasn_fre.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tasn_fre.c,v 1.12 2014/07/10 12:24:25 tedu Exp $ */ | 1 | /* $OpenBSD: tasn_fre.c,v 1.13 2015/02/14 13:32:46 jsing 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 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -86,16 +86,14 @@ asn1_item_combine_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int combine) | |||
| 86 | const ASN1_EXTERN_FUNCS *ef; | 86 | const ASN1_EXTERN_FUNCS *ef; |
| 87 | const ASN1_COMPAT_FUNCS *cf; | 87 | const ASN1_COMPAT_FUNCS *cf; |
| 88 | const ASN1_AUX *aux = it->funcs; | 88 | const ASN1_AUX *aux = it->funcs; |
| 89 | ASN1_aux_cb *asn1_cb; | 89 | ASN1_aux_cb *asn1_cb = NULL; |
| 90 | int i; | 90 | int i; |
| 91 | 91 | ||
| 92 | if (pval == NULL || *pval == NULL) | 92 | if (pval == NULL || *pval == NULL) |
| 93 | return; | 93 | return; |
| 94 | 94 | ||
| 95 | if (aux && aux->asn1_cb) | 95 | if (aux != NULL && aux->asn1_cb != NULL) |
| 96 | asn1_cb = aux->asn1_cb; | 96 | asn1_cb = aux->asn1_cb; |
| 97 | else | ||
| 98 | asn1_cb = 0; | ||
| 99 | 97 | ||
| 100 | switch (it->itype) { | 98 | switch (it->itype) { |
| 101 | case ASN1_ITYPE_PRIMITIVE: | 99 | case ASN1_ITYPE_PRIMITIVE: |
