walnux/libs/libc/string
Oki Minabe 185b1cb1b7 libc/string: strcmp/strncmp cast unsigned char
Summary:
- Cast to unsigned char for strcmp and strncmp
- strcmp and strncmp are described following by opengroup.org

  The sign of a non-zero return value shall be determined by the sign
  of the difference between the values of the first pair of bytes
  (both interpreted as type unsigned char) that differ in the strings
  being compared.

  https://pubs.opengroup.org/onlinepubs/9699919799/functions/strcmp.html
  https://pubs.opengroup.org/onlinepubs/9699919799/functions/strncmp.html

Impact:
- strcmp and strncmp return value

Testing:
- ostest on sabre-6quad:smp w/ qemu

Signed-off-by: Oki Minabe <minabe.oki@gmail.com>
2022-04-23 16:11:00 +03:00
..
Kconfig docs and comments: Update stale references to COPYING 2021-04-01 21:10:56 -05:00
lib_explicit_bzero.c libs: libc: Haltian Ltd: update licenses to Apache 2021-11-15 06:49:32 -06:00
lib_ffs.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_ffsl.c libs: nxstyle fixes 2021-03-03 18:52:53 -08:00
lib_ffsll.c libs: nxstyle fixes 2021-03-03 18:52:53 -08:00
lib_fls.c libs: libc: Haltian Ltd: update licenses to Apache 2021-11-15 06:49:32 -06:00
lib_flsl.c libs: libc: Haltian Ltd: update licenses to Apache 2021-11-15 06:49:32 -06:00
lib_flsll.c libs: libc: Haltian Ltd: update licenses to Apache 2021-11-15 06:49:32 -06:00
lib_index.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_isbasedigit.c libs: nxstyle fixes 2021-03-03 18:52:53 -08:00
lib_memccpy.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_memchr.c Fix -Werror=nonnull-compare and -Werror=format-truncation= 2022-03-02 15:55:38 +08:00
lib_memcmp.c libc: Avoid the compiler generate code call self(memcpy/memmove/memset/memcmp) recursively 2022-04-05 13:25:53 +03:00
lib_memcpy.c libc: Avoid the compiler generate code call self(memcpy/memmove/memset/memcmp) recursively 2022-04-05 13:25:53 +03:00
lib_memmove.c libc: Avoid the compiler generate code call self(memcpy/memmove/memset/memcmp) recursively 2022-04-05 13:25:53 +03:00
lib_memrchr.c sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
lib_memset.c libc: Avoid the compiler generate code call self(memcpy/memmove/memset/memcmp) recursively 2022-04-05 13:25:53 +03:00
lib_popcount.c libc: Implement popcount/popcountl/popcountll 2020-09-21 07:37:04 -07:00
lib_popcountl.c libc: Implement popcount/popcountl/popcountll 2020-09-21 07:37:04 -07:00
lib_popcountll.c libc: Implement popcount/popcountl/popcountll 2020-09-21 07:37:04 -07:00
lib_rindex.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_skipspace.c libs: nxstyle fixes 2021-03-03 18:52:53 -08:00
lib_stpcpy.c sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
lib_stpncpy.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_strcasecmp.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_strcasestr.c libs: nxstyle fixes 2021-03-03 18:52:53 -08:00
lib_strcat.c libc/string: Fix the minor style issue 2022-04-05 13:25:53 +03:00
lib_strchr.c Fix -Werror=nonnull-compare and -Werror=format-truncation= 2022-03-02 15:55:38 +08:00
lib_strchrnul.c libc/string: add lib_strchrnul. 2021-09-22 09:20:06 -03:00
lib_strcmp.c libc/string: strcmp/strncmp cast unsigned char 2022-04-23 16:11:00 +03:00
lib_strcoll.c
lib_strcpy.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_strcspn.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_strdup.c Fix -Werror=nonnull-compare and -Werror=format-truncation= 2022-03-02 15:55:38 +08:00
lib_strerror.c libc: Change the return type of strerror from "const char *" to "char *" 2022-03-20 23:02:50 +02:00
lib_strerrorr.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_strlcat.c libc/str:add strlcat to libc 2021-11-26 15:24:35 -03:00
lib_strlcpy.c libc: Implement strlcpy function 2020-08-14 03:44:26 -07:00
lib_strlen.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_strncasecmp.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_strncat.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_strncmp.c libc/string: strcmp/strncmp cast unsigned char 2022-04-23 16:11:00 +03:00
lib_strncpy.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_strndup.c Fix -Werror=nonnull-compare and -Werror=format-truncation= 2022-03-02 15:55:38 +08:00
lib_strnlen.c libs: libc: update licenses to Apache 2021-05-27 08:07:25 +09:00
lib_strpbrk.c Fix -Werror=nonnull-compare and -Werror=format-truncation= 2022-03-02 15:55:38 +08:00
lib_strrchr.c Fix -Werror=nonnull-compare and -Werror=format-truncation= 2022-03-02 15:55:38 +08:00
lib_strsep.c Change all files come from Xiaomi/Pinecone to Apache License 2.0 2020-08-22 17:37:21 -06:00
lib_strsignal.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_strspn.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_strstr.c libc/string:add LICENSE info 2022-04-14 21:46:12 +08:00
lib_strtok.c add #undef for some libc function 2021-07-14 15:09:58 -03:00
lib_strtokr.c libc/string: Fix the minor style issue 2022-04-05 13:25:53 +03:00
lib_strxfrm.c
lib_vikmemcpy.c libc: Avoid the compiler generate code call self(memcpy/memmove/memset/memcmp) recursively 2022-04-05 13:25:53 +03:00
Make.defs libs/lbc: remove CHAR_BIT = 16 support 2021-12-13 11:08:28 -06:00