aboutsummaryrefslogtreecommitdiff
path: root/string/rawmemchr.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/rawmemchr.c')
-rw-r--r--string/rawmemchr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string/rawmemchr.c b/string/rawmemchr.c
index b44ad79859..aa8f8f2336 100644
--- a/string/rawmemchr.c
+++ b/string/rawmemchr.c
@@ -39,7 +39,7 @@ DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread");
void *
RAWMEMCHR (const void *s, int c)
{
- if (c != '\0')
+ if ((unsigned char) c != '\0')
return memchr (s, c, (size_t)-1);
return (char *)s + strlen (s);
}