summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/string.c b/lib/string.c
index 5e82ce28c..89850b44f 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -370,7 +370,7 @@ void *memchr(const void *s, int c, size_t n)
const unsigned char *p = s;
while (n-- != 0) {
if ((unsigned char)c == *p++) {
- return p-1;
+ return (void *)p-1;
}
}
return NULL;