vfio/pci: Fix integer overflows, bitmask check
[linux/fpc-iii.git] / arch / mips / boot / compressed / string.c
blob9de9885acd0dbcac06604aa5ce4cc7e0e09ae7b5
1 /*
2 * arch/mips/boot/compressed/string.c
4 * Very small subset of simple string routines
5 */
7 #include <linux/types.h>
9 void *memcpy(void *dest, const void *src, size_t n)
11 int i;
12 const char *s = src;
13 char *d = dest;
15 for (i = 0; i < n; i++)
16 d[i] = s[i];
17 return dest;
20 void *memset(void *s, int c, size_t n)
22 int i;
23 char *ss = s;
25 for (i = 0; i < n; i++)
26 ss[i] = c;
27 return s;