tools/nolibc: fix standard conformance of a few string functions
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | tools/nolibc: fix strchr() and strrchr() for the NUL terminatortools/ tools/ | +6 | 0 replies | |
| 2/3 | tools/nolibc: fix strstr() with an empty needletools/ tools/ | +2 | 0 replies | |
| 3/3 | tools/nolibc: make atoi() and atol() skip whitespace and accept '+'tools/ tools/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] tools/nolibc: fix standard conformance of a few string functions
A few nolibc functions deviate from the C standard in corner cases:
strchr()/strrchr() do not find the terminating NUL, strstr() returns NULL for an empty needle, and atoi()/atol() do not skip leading whitespace or accept a '+' sign.
Fix them and add test cases. The new tests fail without the fixes. The results were also compared against glibc.
Arav Verma (3):
tools/nolibc: fix strchr() and strrchr() for the NUL terminator tools/nolibc: fix strstr() with an empty needle tools/nolibc: make atoi() and atol() skip whitespace and accept '+'
tools/include/nolibc/stdlib.h | 5 +++++ tools/include/nolibc/string.h | 12 +++++------- tools/testing/selftests/nolibc/nolibc-test.c | 9 +++++++++ 3 files changed, 19 insertions(+), 7 deletions(-)
Signature · 1 line
2.47.3