shithub: riscv

ref: 52e4e51b50589ecb2b06559c28b7ce9f682815be
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;
}