treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / mips / boot / compressed / string.c
blob43beecc3587cdd92b9cbe8ddbb293ba179b5cd01
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * arch/mips/boot/compressed/string.c
5 * Very small subset of simple string routines
6 */
8 #include <linux/types.h>
10 void *memcpy(void *dest, const void *src, size_t n)
12 int i;
13 const char *s = src;
14 char *d = dest;
16 for (i = 0; i < n; i++)
17 d[i] = s[i];
18 return dest;
21 void *memset(void *s, int c, size_t n)
23 int i;
24 char *ss = s;
26 for (i = 0; i < n; i++)
27 ss[i] = c;
28 return s;