git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbf9017
)
libreplace: Fix a C++ warning
author
Volker Lendecke
<vl@samba.org>
Sun, 3 Jan 2010 17:46:21 +0000
(18:46 +0100)
committer
Volker Lendecke
<vl@samba.org>
Sat, 23 Jan 2010 13:35:38 +0000
(14:35 +0100)
lib/replace/replace.c
patch
|
blob
|
history
diff --git
a/lib/replace/replace.c
b/lib/replace/replace.c
index 17fd46bcc89828b5bd85ce7573c68fafe106c04c..df29185564608896a8613a4705726ae90555a671 100644
(file)
--- 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;