linux/arch/mips/boot/compressed/string.c
<<
>>
Prefs
   1// SPDX-License-Identifier: GPL-2.0
   2/*
   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}
  30