mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
lz4: add memmove to arm string.c
This commit is contained in:
parent
d48fcbf5eb
commit
381b47f64e
4 changed files with 19 additions and 21 deletions
|
@ -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
|
||||
**************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue