summaryrefslogtreecommitdiff
path: root/lib/libc/string/memcpy.c
blob: 7573c01ffeb556607ed64bb6f6049451314512b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <string.h>

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

	while (n--)
		*tmp++ = *s++;
	return s1;
}