Attention is currently required from: Jakub Czapiga, Julius Werner, Maximilian Brune, Yu-Ping Wu.
Hello Jakub Czapiga, Julius Werner, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/83830?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed: Code-Review+2 by Julius Werner, Verified+1 by build bot (Jenkins)
Change subject: commonlib/bsd: Add strlen() and strnlen() functions ......................................................................
commonlib/bsd: Add strlen() and strnlen() functions
Add strlen() and strnlen() to commonlib/bsd by rewriting them from scratch, and remove the same functions from coreboot and libpayload.
Note that in the existing libpayload implementation, these functions return 0 for NULL strings. Given that POSIX doesn't require the NULL check and that other major libc implementations (e.g. glibc [1]) don't seem to do that, the new functions also don't perform the NULL check.
[1] https://github.com/bminor/glibc/blob/master/sysdeps/i386/strlen.c
Change-Id: I1203ec9affabe493bd14b46662d212b08240cced Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M payloads/libpayload/include/string.h M payloads/libpayload/libc/string.c M src/commonlib/bsd/include/commonlib/bsd/string.h M src/commonlib/bsd/string.c M src/include/string.h M src/lib/string.c M tests/commonlib/bsd/string-test.c M tests/lib/string-test.c 8 files changed, 70 insertions(+), 103 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/83830/2