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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83830 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> |
||
|---|---|---|
| .. | ||
| b64_decode-test.c | ||
| bootmem-test.c | ||
| cbfs-lookup-test.c | ||
| cbfs-verification-test.c | ||
| cbmem_console-test.c | ||
| cbmem_stage_cache-test.c | ||
| coreboot_table-test.c | ||
| crc_byte-test.c | ||
| dimm_info_util-test.c | ||
| edid-test.c | ||
| fmap-test.c | ||
| hexstrtobin-test.c | ||
| imd-test.c | ||
| imd_cbmem-test.c | ||
| lib-test.c | ||
| libgcc-test.c | ||
| lzma-test.c | ||
| Makefile.mk | ||
| malloc-test.c | ||
| memchr-test.c | ||
| memcmp-test.c | ||
| memcpy-test.c | ||
| memmove-test.c | ||
| memrange-test.c | ||
| memset-test.c | ||
| region_file-test.c | ||
| rtc-test.c | ||
| spd_cache-test.c | ||
| stack-test.c | ||
| string-test.c | ||
| timestamp-test.c | ||
| uuid-test.c | ||
| ux_locales-test.c | ||