aboutsummaryrefslogtreecommitdiff
path: root/lib/libk/stdlib/memcpy.c
blob: 90470d5f7b061efcfba10482217d25f696ebd716 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
void *
memcpy(void *restrict dest, const void *restrict src, long unsigned n)
{
  char *pDest = (char *)dest;
  const char *pSrc = (const char *)src;

  while (n) {
    *(pDest++) = *(pSrc++);
    --n;
  }

  return dest;
}