diff options
author | Ken Raeburn <raeburn@mit.edu> | 2008-08-07 03:29:52 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2008-08-07 03:29:52 +0000 |
commit | 52a5d1f981236517b295badcb96bbbd5734b2fd0 (patch) | |
tree | c5278a5f498cef9d01525c301b8c62e127ca9290 /src/lib/krb5/asn.1 | |
parent | 660520617d845a3159ae573e0609fd12e95a0815 (diff) | |
download | krb5-52a5d1f981236517b295badcb96bbbd5734b2fd0.tar.gz krb5-52a5d1f981236517b295badcb96bbbd5734b2fd0.tar.xz krb5-52a5d1f981236517b295badcb96bbbd5734b2fd0.zip |
sequence_of_no_tagvars declared variables used only in
end_sequence_of_no_tagvars and only as unnecessary temporaries, so get
rid of them; also, push most of the work of the latter macro into a
helper function.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20632 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/asn.1')
-rw-r--r-- | src/lib/krb5/asn.1/asn1_k_decode.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/lib/krb5/asn.1/asn1_k_decode.c b/src/lib/krb5/asn.1/asn1_k_decode.c index 91e6ffcf5..10d0a05f8 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.c +++ b/src/lib/krb5/asn.1/asn1_k_decode.c @@ -284,11 +284,6 @@ asn1_get_eoc_tag (asn1buf *buf) * than does sequence_of() to avoid shadowing. */ #define sequence_of_no_tagvars(buf) \ - asn1_class eseqclass; \ - asn1_construction eseqconstr; \ - asn1_tagnum eseqnum; \ - unsigned int eseqlen; \ - int eseqindef; \ sequence_of_common(buf) /* @@ -335,21 +330,22 @@ asn1_get_eoc_tag (asn1buf *buf) * Like end_sequence_of(), but uses the different (non-shadowing) * variable names. */ -#define end_sequence_of_no_tagvars(buf) \ - { \ - taginfo t5; \ - retval = asn1_get_tag_2(&seqbuf, &t5); \ - if (retval) return retval; \ - /* Copy out to match previous functionality, until better integrated. */ \ - eseqclass = t5.asn1class; \ - eseqconstr = t5.construction; \ - eseqnum = t5.tagnum; \ - eseqlen = t5.length; \ - eseqindef = t5.indef; \ - } \ - retval = asn1buf_sync(buf, &seqbuf, eseqclass, eseqnum, \ - eseqlen, eseqindef, seqofindef); \ - if (retval) return retval; +static asn1_error_code +end_sequence_of_no_tagvars_helper(asn1buf *buf, asn1buf *seqbufp, + int seqofindef) +{ + taginfo t; + asn1_error_code retval; + + retval = asn1_get_tag_2(seqbufp, &t); + if (retval) + return retval; + retval = asn1buf_sync(buf, seqbufp, t.asn1class, t.tagnum, + t.length, t.indef, seqofindef); + return retval; +} +#define end_sequence_of_no_tagvars(buf) \ + end_sequence_of_no_tagvars_helper(buf, &seqbuf, seqofindef) #define cleanup() \ return 0 |