scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit eee36acd2143365c7c8094175dd425158b4944d4
parent bce4640e225094e43c4dd1c6a151abeb0dd3703f
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu,  3 Nov 2022 07:05:52 +0100

libc/string: Use explicit cast in strcspn()

Signess of base types is important for pointer type
checks.

Diffstat:
Msrc/libc/string/strcspn.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libc/string/strcspn.c b/src/libc/string/strcspn.c @@ -5,8 +5,8 @@ size_t strcspn(const char *s1, const char *s2) { - const unsigned char *s = s1; - const unsigned char *reject = s2; + const unsigned char *s = (const unsigned char *) s1; + const unsigned char *reject = (const unsigned char *) s2; size_t n; unsigned ch; char map[__NUMCHARS] = {0};