Change the return type of the replacement function for rawmemchr
to match that of glibc's rawmemchr.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14651 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c
index 11d72b9..78923eb 100644
--- a/shared/vg_replace_strmem.c
+++ b/shared/vg_replace_strmem.c
@@ -1229,15 +1229,15 @@
/* Find the first occurrence of C in S. */
#define GLIBC232_RAWMEMCHR(soname, fnname) \
- char* VG_REPLACE_FUNCTION_EZU(20260,soname,fnname) \
- (const char* s, int c_in); \
- char* VG_REPLACE_FUNCTION_EZU(20260,soname,fnname) \
- (const char* s, int c_in) \
+ void* VG_REPLACE_FUNCTION_EZU(20260,soname,fnname) \
+ (const void* s, int c_in); \
+ void* VG_REPLACE_FUNCTION_EZU(20260,soname,fnname) \
+ (const void* s, int c_in) \
{ \
- UChar c = (UChar) c_in; \
- UChar* char_ptr = (UChar *)s; \
+ UChar c = (UChar) c_in; \
+ const UChar* char_ptr = s; \
while (1) { \
- if (*char_ptr == c) return (HChar *)char_ptr; \
+ if (*char_ptr == c) return (void *)char_ptr; \
char_ptr++; \
} \
}