xref: /linux/arch/mips/boot/compressed/string.c (revision e8d235d4d8fb8957bae5f6ed4521115203a00d8b)
1 /*
2  * arch/mips/boot/compressed/string.c
3  *
4  * Very small subset of simple string routines
5  */
6 
7 #include <linux/types.h>
8 
9 void *memcpy(void *dest, const void *src, size_t n)
10 {
11 	int i;
12 	const char *s = src;
13 	char *d = dest;
14 
15 	for (i = 0; i < n; i++)
16 		d[i] = s[i];
17 	return dest;
18 }
19 
20 void *memset(void *s, int c, size_t n)
21 {
22 	int i;
23 	char *ss = s;
24 
25 	for (i = 0; i < n; i++)
26 		ss[i] = c;
27 	return s;
28 }
29