summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/gen/memset.c
blob: 902874412c095e9592cd01a746316dbe05cd6f5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <string.h>

void*
memset(void *ap, int c, size_t n)
{
	char *p;

	p = ap;
	while(n > 0) {
		*p++ = c;
		n--;
	}
	return ap;
}