libc: fix memchr() prototype
The standard memchr() uses an int for its second argument.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
diff --git a/lib/libc/minimal/source/string/string.c b/lib/libc/minimal/source/string/string.c
index f965181..4dbc32d 100644
--- a/lib/libc/minimal/source/string/string.c
+++ b/lib/libc/minimal/source/string/string.c
@@ -357,13 +357,13 @@
* @return pointer to start of found byte
*/
-void *memchr(const void *s, unsigned char c, size_t n)
+void *memchr(const void *s, int c, size_t n)
{
if (n != 0) {
const unsigned char *p = s;
do {
- if (*p++ == c) {
+ if (*p++ == (unsigned char)c) {
return ((void *)(p - 1));
}