diff options
author | jpierre%netscape.com <devnull@localhost> | 2002-08-07 03:40:47 +0000 |
---|---|---|
committer | jpierre%netscape.com <devnull@localhost> | 2002-08-07 03:40:47 +0000 |
commit | 92021a7312ec3eca66ac3ea566f652c5a29751f2 (patch) | |
tree | 2a5b94b7508061123a40bd7a2b84a7bc93fbe8ff /security/nss/lib/util | |
parent | ccf71473780735f927e0eed9bb7bc55ebd9444a0 (diff) | |
download | nss-hg-92021a7312ec3eca66ac3ea566f652c5a29751f2.tar.gz |
Reorder functions to avoid forward declaration of DecodePointer
Diffstat (limited to 'security/nss/lib/util')
-rw-r--r-- | security/nss/lib/util/quickder.c | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/security/nss/lib/util/quickder.c b/security/nss/lib/util/quickder.c index 38c42f5e9..8e4eb1ac4 100644 --- a/security/nss/lib/util/quickder.c +++ b/security/nss/lib/util/quickder.c @@ -447,10 +447,6 @@ static SECStatus DecodeItem(void* dest, const SEC_ASN1Template* templateEntry, SECItem* src, QuickAlloc* pool, PRBool checkTag); -static SECStatus DecodePointer(void* dest, - const SEC_ASN1Template* templateEntry, - SECItem* src, QuickAlloc* pool, PRBool checkTag); - static SECStatus DecodeSequence(void* dest, const SEC_ASN1Template* templateEntry, SECItem* src, QuickAlloc* pool) @@ -511,25 +507,6 @@ static SECStatus DecodeInline(void* dest, inlineTemplate, src, pool, PR_TRUE); } -static SECStatus DecodeImplicit(void* dest, - const SEC_ASN1Template* templateEntry, - SECItem* src, QuickAlloc* pool) -{ - if (templateEntry->kind & SEC_ASN1_POINTER) - { - return DecodePointer((void*)((char*)dest ), - templateEntry, src, pool, PR_FALSE); - } - else - { - const SEC_ASN1Template* implicitTemplate = - SEC_ASN1GetSubtemplate (templateEntry, dest, PR_FALSE); - - return DecodeItem((void*)((char*)dest + templateEntry->offset), - implicitTemplate, src, pool, PR_FALSE); - } -} - static SECStatus DecodePointer(void* dest, const SEC_ASN1Template* templateEntry, SECItem* src, QuickAlloc* pool, PRBool checkTag) @@ -549,6 +526,25 @@ static SECStatus DecodePointer(void* dest, } } +static SECStatus DecodeImplicit(void* dest, + const SEC_ASN1Template* templateEntry, + SECItem* src, QuickAlloc* pool) +{ + if (templateEntry->kind & SEC_ASN1_POINTER) + { + return DecodePointer((void*)((char*)dest ), + templateEntry, src, pool, PR_FALSE); + } + else + { + const SEC_ASN1Template* implicitTemplate = + SEC_ASN1GetSubtemplate (templateEntry, dest, PR_FALSE); + + return DecodeItem((void*)((char*)dest + templateEntry->offset), + implicitTemplate, src, pool, PR_FALSE); + } +} + static SECStatus DecodeChoice(void* dest, const SEC_ASN1Template* templateEntry, SECItem* src, QuickAlloc* pool) |