mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
Rewritten to avoid cast that drops const qualification.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14647
This commit is contained in:
parent
17fe8c0a09
commit
361909e022
@ -136,7 +136,7 @@
|
||||
|
||||
#define DO_PthAPIerror(_fnnameF, _errF) \
|
||||
do { \
|
||||
char* _fnname = (char*)(_fnnameF); \
|
||||
const char* _fnname = (_fnnameF); \
|
||||
long _err = (long)(int)(_errF); \
|
||||
const char* _errstr = lame_strerror(_err); \
|
||||
DO_CREQ_v_WWW(_VG_USERREQ__HG_PTH_API_ERROR, \
|
||||
|
||||
@ -1327,8 +1327,6 @@ static inline void my_exit ( int x )
|
||||
void* VG_REPLACE_FUNCTION_EZU(20290,soname,fnname) \
|
||||
( void *dst, const void *src, SizeT len ) \
|
||||
{ \
|
||||
register HChar *d; \
|
||||
register HChar *s; \
|
||||
SizeT len_saved = len; \
|
||||
\
|
||||
if (len == 0) \
|
||||
@ -1338,14 +1336,14 @@ static inline void my_exit ( int x )
|
||||
RECORD_OVERLAP_ERROR("mempcpy", dst, src, len); \
|
||||
\
|
||||
if ( dst > src ) { \
|
||||
d = (char *)dst + len - 1; \
|
||||
s = (char *)src + len - 1; \
|
||||
register HChar *d = (char *)dst + len - 1; \
|
||||
register const HChar *s = (const char *)src + len - 1; \
|
||||
while ( len-- ) { \
|
||||
*d-- = *s--; \
|
||||
} \
|
||||
} else if ( dst < src ) { \
|
||||
d = (char *)dst; \
|
||||
s = (char *)src; \
|
||||
register HChar *d = dst; \
|
||||
register const HChar *s = src; \
|
||||
while ( len-- ) { \
|
||||
*d++ = *s++; \
|
||||
} \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user