summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-03 18:46:21 +0100
committerVolker Lendecke <vl@samba.org>2010-01-23 14:35:38 +0100
commita771c184b19cfabfebd77d61ea2d5c51b5f61ef7 (patch)
tree5e9c56c55809a551a011872cdea5d0bf35edaf92 /lib/replace
parentdbf9017a807f317333596092fc3493d7c5a96c65 (diff)
downloadsamba-a771c184b19cfabfebd77d61ea2d5c51b5f61ef7.tar.gz
samba-a771c184b19cfabfebd77d61ea2d5c51b5f61ef7.tar.bz2
samba-a771c184b19cfabfebd77d61ea2d5c51b5f61ef7.zip
libreplace: Fix a C++ warning
Diffstat (limited to 'lib/replace')
-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;