summaryrefslogtreecommitdiff
path: root/lib/libc/string/memset.c
blob: 59e3bea56d9d214a43cca4fc579079f45aaae9fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stddef.h>
#include <string.h>

void *
memset(void *s, int c, size_t n)
{
	char *xs = s;

	while (n--)
		*xs++ = c;

	return s;
}