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_new.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_new.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/tasn_new.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_new.c b/src/lib/libcrypto/asn1/tasn_new.c index 88ee5c5224..cbc6bfc1d5 100644 --- a/src/lib/libcrypto/asn1/tasn_new.c +++ b/src/lib/libcrypto/asn1/tasn_new.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tasn_new.c,v 1.11 2014/06/12 15:49:27 deraadt Exp $ */ | 1 | /* $OpenBSD: tasn_new.c,v 1.12 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 | */ |
| @@ -94,14 +94,12 @@ asn1_item_ex_combine_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int combine) | |||
| 94 | const ASN1_COMPAT_FUNCS *cf; | 94 | const ASN1_COMPAT_FUNCS *cf; |
| 95 | const ASN1_EXTERN_FUNCS *ef; | 95 | const ASN1_EXTERN_FUNCS *ef; |
| 96 | const ASN1_AUX *aux = it->funcs; | 96 | const ASN1_AUX *aux = it->funcs; |
| 97 | ASN1_aux_cb *asn1_cb; | 97 | ASN1_aux_cb *asn1_cb = NULL; |
| 98 | ASN1_VALUE **pseqval; | 98 | ASN1_VALUE **pseqval; |
| 99 | int i; | 99 | int i; |
| 100 | 100 | ||
| 101 | if (aux && aux->asn1_cb) | 101 | if (aux != NULL && aux->asn1_cb != NULL) |
| 102 | asn1_cb = aux->asn1_cb; | 102 | asn1_cb = aux->asn1_cb; |
| 103 | else | ||
| 104 | asn1_cb = 0; | ||
| 105 | 103 | ||
| 106 | if (!combine) | 104 | if (!combine) |
| 107 | *pval = NULL; | 105 | *pval = NULL; |
