commit 1cb04eea49563c01c1c9d4cc388bbe2cb95292fc
parent 1f46fde231171febcc9ebae4353606acc1fc0ccc
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 3 Nov 2022 07:05:52 +0100
libc/string: Use explicit cast in strspn()
Signess of base types is important for pointer type
checks.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libc/string/strspn.c b/src/libc/string/strspn.c
@@ -5,8 +5,8 @@
size_t
strspn(const char *s1, const char *s2)
{
- const unsigned char *s = s1;
- const unsigned char *accept = s2;
+ const unsigned char *s = (const unsigned char *) s1;
+ const unsigned char *accept = (const unsigned char *) s2;
size_t n;
unsigned ch;
char map[__NUMCHARS] = {0};