shithub: scc

ref: 5c0bbb5ff6603cf20c4e3f4ec16dd7b60799cb85
dir: /src/libc/string/memcpy.c/

View raw version
#include <string.h>

#undef memcpy

void *
memcpy(void *restrict s1, const void *restrict s2, size_t n)
{
	char *d = s1;
	const char *s = s2;

	while (n-- > 0)
		*d++ = *s++;

	return s1;
}