|
From: <sv...@va...> - 2014-10-22 12:06:29
|
Author: florian
Date: Wed Oct 22 13:06:22 2014
New Revision: 14651
Log:
Change the return type of the replacement function for rawmemchr
to match that of glibc's rawmemchr.
Modified:
trunk/shared/vg_replace_strmem.c
Modified: trunk/shared/vg_replace_strmem.c
==============================================================================
--- trunk/shared/vg_replace_strmem.c (original)
+++ trunk/shared/vg_replace_strmem.c Wed Oct 22 13:06:22 2014
@@ -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++; \
} \
}
|