void *memcpy(void *dst, const void *src, size_t n)
{
int i;
+ void *ret = dst;
for(i = 0; i < n % sizeof(unsigned long); i++)
((unsigned char *) dst)[i] = ((unsigned char *) src)[i];
for(i = 0; i < n / sizeof(unsigned long); i++)
((unsigned long *) dst)[i] = ((unsigned long *) src)[i];
- return dst;
+ return ret;
}
void *memmove(void *dst, const void *src, size_t n)
offs = n - (n % sizeof(unsigned long));
for (i = (n % sizeof(unsigned long)) - 1; i >= 0; i--)
- ((unsigned char *)dst)[i + offs] =
+ ((unsigned char *)dst)[i + offs] =
((unsigned char *)src)[i + offs];
for (i = n / sizeof(unsigned long) - 1; i >= 0; i--)