summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bio_lib.c
diff options
context:
space:
mode:
authorcheloha <>2021-12-08 22:06:28 +0000
committercheloha <>2021-12-08 22:06:28 +0000
commit5165d5492b21787880fe5f1c83625ebf368f5859 (patch)
tree7062715ee531af2299c0238b27065eab446cf820 /src/lib/libcrypto/bio/bio_lib.c
parentbc0dd110f81e03683e891dc84e5f213eb81e1750 (diff)
downloadopenbsd-5165d5492b21787880fe5f1c83625ebf368f5859.tar.gz
openbsd-5165d5492b21787880fe5f1c83625ebf368f5859.tar.bz2
openbsd-5165d5492b21787880fe5f1c83625ebf368f5859.zip
lsearch(3): reimplement using lfind(3)
lsearch(3) is really just lfind(3) with an additional branch to append the key if lfind(3) fails. If we get rid of the underlying linear_base() function and move the search portion into lfind(3) and the key-copying portion into lsearch(3) we get smaller and simpler code. Misc. notes: - We do not need to keep the historical comment about errno. lsearch(3) is pure computation and does not set errno. That's really all you need to know. The specification reserves no errors, either. - We are using lfind(3) internally now, so it switches from PROTO_DEPRECATED to PROTO_NORMAL in hidden/search.h and needs DEF_WEAK in stdlib/lsearch.c. With advice from guenther@ on symbol housekeeping in libc. Thread: https://marc.info/?l=openbsd-tech&m=163885187632449&w=2 ok millert@
Diffstat (limited to 'src/lib/libcrypto/bio/bio_lib.c')
0 files changed, 0 insertions, 0 deletions