code: 9ferno

ref: 73d7f19cdee40eff4e78c2326c4c338828b57945
dir: /libkern/memset.c/

View raw version
#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;
}