summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib
diff options
context:
space:
mode:
authortb <>2023-05-12 13:56:17 +0000
committertb <>2023-05-12 13:56:17 +0000
commitb345c57b28722f9d99b4f658837e895ba199555b (patch)
tree3b81e8e07c4ef4750171db0536d98ab2381ad47c /src/lib/libc/stdlib
parentc68792ad5f1a5c23b89cce981773d589934ec0f5 (diff)
downloadopenbsd-b345c57b28722f9d99b4f658837e895ba199555b.tar.gz
openbsd-b345c57b28722f9d99b4f658837e895ba199555b.tar.bz2
openbsd-b345c57b28722f9d99b4f658837e895ba199555b.zip
Rewrite string_to_hex() and hex_to_string() using CBB/CBS
These helpers used to contain messy pointer bashing some with weird logic for NUL termination. This can be written more safely and cleanly using CBB/CBS, so do that. The result is nearly but not entirely identical to code used elsewhere due to some strange semantics. Apart from errors pushed on the stack due to out-of-memory conditions, care was taken to preserve error codes. ok jsing
Diffstat (limited to 'src/lib/libc/stdlib')
0 files changed, 0 insertions, 0 deletions