summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/replace/replace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index 17fd46bcc8..df29185564 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -691,8 +691,8 @@ void *rep_memmem(const void *haystack, size_t haystacklen,
return discard_const(haystack);
}
while (haystacklen >= needlelen) {
- char *p = memchr(haystack, *(const char *)needle,
- haystacklen-(needlelen-1));
+ char *p = (char *)memchr(haystack, *(const char *)needle,
+ haystacklen-(needlelen-1));
if (!p) return NULL;
if (memcmp(p, needle, needlelen) == 0) {
return p;