From: Florian Krohm Date: Wed, 22 Oct 2014 12:06:22 +0000 (+0000) Subject: Change the return type of the replacement function for rawmemchr X-Git-Tag: svn/VALGRIND_3_11_0~897 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0869fe07cd8a6a21011ae960cd58581a5151ad4;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index 11d72b949b..78923ebe28 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -1229,15 +1229,15 @@ static inline void my_exit ( int x ) /* 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++; \ } \ }