Attention is currently required from: Julius Werner.
Hello Yu-Ping Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/83933?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed: Verified+1 by build bot (Jenkins)
Change subject: commonlib/bsd: Optimize strnlen() ......................................................................
commonlib/bsd: Optimize strnlen()
This patch changes the strnlen() implementation to fix a small issue where we would dereference once more byte than intended when not finding a NUL-byte within the specified amount of characters. It also changes the implementation to rely on a pre-calculated end pointer rather than a running counter, since this seems to lead to slightly better assembly (one less instruction in the inner loop) on most architectures.
Change-Id: Ic36768fd3a26e2b64143904e78cd0b52ba66898d Signed-off-by: Julius Werner jwerner@chromium.org --- M src/commonlib/bsd/string.c 1 file changed, 13 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/83933/2