1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-07 01:58:28 +03:00

r18052: discard_const_p() isn't part of the libreplace API, so we can't use it

inside libreplace.
(This used to be commit 5745ecdd826c387137a742f32ee3c8f60191a6a7)
This commit is contained in:
Andrew Tridgell 2006-09-04 22:58:55 +00:00 committed by Gerald (Jerry) Carter
parent a0202040e2
commit cbae8b2014

View File

@ -506,7 +506,7 @@ char *rep_strcasestr(const char *haystack, const char *needle)
for (s=haystack;*s;s++) { for (s=haystack;*s;s++) {
if (toupper(*needle) == toupper(*s) && if (toupper(*needle) == toupper(*s) &&
strncasecmp(s, needle, nlen) == 0) { strncasecmp(s, needle, nlen) == 0) {
return discard_const_p(char, s); return (char *)((intptr_t)s);
} }
} }
return NULL; return NULL;