diff options
author | jsing <> | 2022-05-07 10:03:49 +0000 |
---|---|---|
committer | jsing <> | 2022-05-07 10:03:49 +0000 |
commit | ca42b63078f68d76fac152f5bd2146e6b6d1eb17 (patch) | |
tree | 5a3cc6a41afff35410e053b557ab38020bc57d33 /src/usr.bin/nc | |
parent | 06373cf29b7f2f1c4fdd09ce26d5671ac29e3675 (diff) | |
download | openbsd-ca42b63078f68d76fac152f5bd2146e6b6d1eb17.tar.gz openbsd-ca42b63078f68d76fac152f5bd2146e6b6d1eb17.tar.bz2 openbsd-ca42b63078f68d76fac152f5bd2146e6b6d1eb17.zip |
Refactor asn1_ex_c2i()
The asn1_ex_c2i() function currently handles the V_ASN1_ANY case inline,
which means there multiple special cases, with pointer fudging and
restoring. Instead, split asn1_ex_c2i() into three functions - one that
only handles storage into a primitive type (asn1_ex_c2i_primitive()), one
that handles the V_ASN1_ANY case (asn1_ex_c2i_any()) and calls
asn1_ex_c2i_primitive() with the correct pointer and an asn1_ex_c2i()
that handles the custom functions case, before dispatching to
asn1_ex_c2i_any() or asn1_ex_c2i_primitive(), as appropriate.
This results in cleaner and simpler code.
With input from and ok tb@
Diffstat (limited to 'src/usr.bin/nc')
0 files changed, 0 insertions, 0 deletions