summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc
diff options
context:
space:
mode:
authorjsing <>2022-05-07 10:03:49 +0000
committerjsing <>2022-05-07 10:03:49 +0000
commitca42b63078f68d76fac152f5bd2146e6b6d1eb17 (patch)
tree5a3cc6a41afff35410e053b557ab38020bc57d33 /src/usr.bin/nc
parent06373cf29b7f2f1c4fdd09ce26d5671ac29e3675 (diff)
downloadopenbsd-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