blob: 43beecc3587cdd92b9cbe8ddbb293ba179b5cd01 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Antony Pavlovdc4d7b32014-01-14 01:30:56 +04002/*
3 * arch/mips/boot/compressed/string.c
4 *
5 * Very small subset of simple string routines
6 */
7
8#include <linux/types.h>
9
10void *memcpy(void *dest, const void *src, size_t n)
11{
12 int i;
13 const char *s = src;
14 char *d = dest;
15
16 for (i = 0; i < n; i++)
17 d[i] = s[i];
18 return dest;
19}
20
21void *memset(void *s, int c, size_t n)
22{
23 int i;
24 char *ss = s;
25
26 for (i = 0; i < n; i++)
27 ss[i] = c;
28 return s;
29}