summaryrefslogtreecommitdiff
path: root/lib/libc/string/memset.c
blob: da969d16a5c72594389429c114bce8c1ed999716 (plain)
1
2
3
4
5
6
7
8
9
10
#include <string.h>

void *memset(void *s, int c, size_t n)
{
	unsigned char *p = s;
	while (n--) {
		*p++ = (unsigned char)c;
	}
	return s;
}