shithub: riscv

ref: 3f9d5e4a4f9e4f0b5fe66e4a6745a4b8c5f6e447
dir: /sys/src/libc/port/memset.c/

View raw version
#include	<u.h>
#include	<libc.h>

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

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