Add memcpy

This commit is contained in:
Ali Mashtizadeh 2014-07-02 16:18:40 -07:00
parent 0c4cd070ec
commit f0b4968b62

View File

@ -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;
}