shithub: riscv

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