summaryrefslogtreecommitdiff
path: root/libkern/memset.c
blob: 270fca25230bc69343d2537d4e91823af1bf1b36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include	<lib9.h>

void*
memset(void *ap, int c, ulong n)
{
	char *p;
	int m = (int)n;

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