summaryrefslogtreecommitdiff
path: root/src/lib/memcpy.c
blob: e1fa3c56cf4d616a7f0241206dcf758cd212ecac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* SPDX-License-Identifier: GPL-2.0-only */

#include <string.h>
void *memcpy(void *vdest, const void *vsrc, size_t bytes)
{
	const char *src = vsrc;
	char *dest = vdest;
	int i;

	for (i = 0; i < (int)bytes; i++)
		dest[i] = src[i];

	return vdest;
}