Page MenuHomeFreeBSD

lib/libc/amd64/string: implement strpbrk() through strcspn()
ClosedPublic

Authored by fuz on Sep 25 2023, 9:49 PM.
Tags
None
Referenced Files
F132254265: D41980.diff
Wed, Oct 15, 5:42 AM
Unknown Object (File)
Sat, Oct 11, 11:46 AM
Unknown Object (File)
Sat, Oct 11, 11:46 AM
Unknown Object (File)
Sat, Oct 11, 11:46 AM
Unknown Object (File)
Sat, Oct 11, 3:45 AM
Unknown Object (File)
Mon, Oct 6, 9:38 AM
Unknown Object (File)
Tue, Sep 23, 10:15 AM
Unknown Object (File)
Wed, Sep 17, 10:08 PM
Subscribers

Details

Summary

This lets us use our optimised strcspn() routine for strpbrk() calls.

In principle, this change could be applied to all architectures
through modification of lib/libc/string/strpbrk.c as strcspn
has a better generic implementation than strpbrk. I have avoided
this as to reduce the impact of these changes. If desired I can
update this DR to do so.

Sponsored by: The FreeBSD Foundation

Test Plan

passes test suite

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable