Add memcpy
This commit is contained in:
parent
0c4cd070ec
commit
f0b4968b62
@ -49,3 +49,18 @@ memset(void *dst, uint8_t c, size_t length)
|
||||
return dst;
|
||||
}
|
||||
|
||||
void *
|
||||
memcpy(void *dst, const void *src, size_t length)
|
||||
{
|
||||
uint8_t *d = (uint8_t *)dst;
|
||||
const uint8_t *s = (const uint8_t *)src;
|
||||
|
||||
do {
|
||||
*d = *s;
|
||||
d += 1;
|
||||
s += 1;
|
||||
} while (--length != 0);
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user