aboutsummaryrefslogtreecommitdiff
path: root/libgcc/memset.c
blob: 3e7025ee39443990b016a56f51aa1c2dbb63c6cd (plain)
1
2
3
4
5
6
7
8
9
10
11
/* Public domain.  */
#include <stddef.h>

void *
memset (void *dest, int val, size_t len)
{
  unsigned char *ptr = dest;
  while (len-- > 0)
    *ptr++ = val;
  return dest;
}