lz4: add memmove to arm string.c
This commit is contained in:
@@ -182,26 +182,6 @@
|
||||
#include <string.h> /* memset, memcpy */
|
||||
#define MEM_INIT(p,v,s) memset((p),(v),(s))
|
||||
|
||||
#ifdef NEED_MEMMOVE
|
||||
void *
|
||||
memmove (void *dest, const void *src, size_t len)
|
||||
{
|
||||
char *d = dest;
|
||||
const char *s = src;
|
||||
if (d < s)
|
||||
while (len--)
|
||||
*d++ = *s++;
|
||||
else
|
||||
{
|
||||
char *lasts = (char*)s + (len-1);
|
||||
char *lastd = d + (len-1);
|
||||
while (len--)
|
||||
*lastd-- = *lasts--;
|
||||
}
|
||||
return dest;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-************************************
|
||||
* Common Constants
|
||||
**************************************/
|
||||
|
||||
Reference in New Issue
Block a user