shithub: riscv

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